Redirect a domain to another domain?


#1

Hi, how to Redirect a domain to another domain? Can it be done using DNS only?


#2

What kind of redirect you want 301 or 302

what kind of DNS? cloudflare or something else?


#3

Permanent redirect, 301!

I can use cloudflare but the domain is from GoDaddy.


#4

There is a domain forwarding option in Godaddy. You can use that and godaddy will handle the redirect.

If you want more control over the redirect then you can configure domain on cloudflare as well.


#5

This, right? And what is Forward with masking? :thinking:


#6

http://www.networksolutions.com/support/what-is-web-forwarding-and-masking/


#7

Forwarding with masking is the weirdest form of redirect.

It will continue to show the old domain name but will internally take you to the new domain.

e.g. You get to show www.example.com in url windows while content is being served form www.example.org


#8

Thank you! :smile:

And in around how much time we can see the results from a domain redirection? :thinking: Do you have any idea about this?


#9

It should happen instantly in most cases but feel free to PM me in case you have any doubts.


#10

I would recommend a simple way. (step-by-step, no step missed)

  • Login to Cloudflare
  • Add your old domain
  • Select free plan
  • Update nameservers at your domain registrar.
  • DNS propagation may take sometimes.
  • Assuming, Cloudflare is active
  • Go to DNS, create two A records namely @ and www
  • Point to your new domain hosting IP address
  • Go to Crypto > Turn on Flexible SSL (To have free of cost SSL support for the old domain)
  • Go to Page rule
  • Create a Forwarding rule

From *old.com*

To https://www.new.com/$2

Set HTTP status code 301 or 302 whatever you need.

  • Apply and save.

The wildcard redirection will start working immediately.

I think, this is better option than any other. Once I had used GoDaddy forwarding. It works but there are two catch.

  • Some useless redirect chain
  • No HTTPS support (by default)

How to redirect from old domain to homepage?
301 Redirect
#11

Thanks for this! I’ll try.

And I don’t want to redirect any visitors or anything from one domain to another. I just want the SEO effects so HTTPS is necessary in this case?


#12

If you were using HTTPS for your old domain? Think logically, how Googlebot will reach? Without HTTPS? No. They still need HTTPS support.


#13

And how to check this? :thinking: I am redirecting an expired domain! So, I don’t know if SSL was used before or not. I just want to redirect it so that I can see the effects of backlinks from old to the new domain.


#14

In any case, having HTTPS support won’t harm. It’s best for accessibility.

Please pay attention to the rule. It is suggested that

From
*old.com*

This match http/https/www/non-www everything :heart_eyes:

Consider something, match viewer case. Whatever visitor enter, next rule will follow.

To
https://www.new.com/$2

Finally, here you are free to adjust http/https/www/non-www. Then $2 means, matching URL pattern with both stars (including permalink, not just homepage.)

I hope this clarifies.


#15

Oh okay! Thanks. I’ll try this now. :smile:


#16

You’re most welcome!


#17

Wrong. $2 will mean it will inherit the directory structure of the second Asterisk (*)


#18

Yes, this is what I am saying.

If there were case to keep http://old.com/* then… I might keep https://old.com/$1
It is based on Regular expression.


#19

Exactly.

and if You make a rule like:

*.example.com/* -> https://www.example.org/$1/$2 then it will do the following:
you visit help.example.com/supportticket.php 
it will take you to example.org/help/supportticket.php