Hi, how to Redirect a domain to another domain? Can it be done using DNS only?
What kind of redirect you want 301 or 302
what kind of DNS? cloudflare or something else?
Permanent redirect, 301!
I can use cloudflare but the domain is from GoDaddy.
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.
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.
And in around how much time we can see the results from a domain redirection? Do you have any idea about this?
It should happen instantly in most cases but feel free to PM me in case you have any doubts.
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
- 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
Set HTTP status code
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)
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?
If you were using HTTPS for your old domain? Think logically, how Googlebot will reach? Without HTTPS? No. They still need HTTPS support.
And how to check this? 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.
In any case, having HTTPS support won’t harm. It’s best for accessibility.
Please pay attention to the rule. It is suggested that
This match http/https/www/non-www everything
Consider something, match viewer case. Whatever visitor enter, next rule will follow.
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.
Oh okay! Thanks. I’ll try this now.
You’re most welcome!
Wrong. $2 will mean it will inherit the directory structure of the second Asterisk (*)
Yes, this is what I am saying.
If there were case to keep
http://old.com/* then… I might keep
It is based on Regular expression.
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