How to redirect user from one domain which does not have any hosting to another domain which has one

yrshaikh

Registered
Feb 28, 2014
1
0
1
cPanel Access Level
Root Administrator
I have a domain1.com with - removed - and a hosting plan with it. I recently purchased another domain2.com from a seller on godaddy.com. That domain is with goDaddy.com.

I want to redirect all request from the "domain1.com" to "domain2.com". So in godaddy there was this option called "Forwarding" where i could enter my destination domain "domain2.com" and select 301 or 302. I selected 302. And now whenever i hit domain2.com in my browser url it gets redirected to domain1.com

However when i enter /http://www.domain2.com (with the /www.) it does not redirect, it opens up the web page which was configured before i purchased the domain from the seller.

What should I change ?
 

vanessa

Well-Known Member
PartnerNOC
Sep 26, 2006
833
28
178
Virginia Beach, VA
cPanel Access Level
DataCenter Provider
Re: How to redirect user from one domain which does not have any hosting to another domain which has

I don't know how Godaddy's forwarding works, but perhaps when you forward domain.com, it ONLY forwards domain.com, not any subdomain of it. www.domain.com is actually a subdomain. So you'll probably need to forward that too, but honestly, it would be best if you just point the nameservers to your hosting provider and add the domain in cPanel as a parked domain, if you're able to do so.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Re: How to redirect user from one domain which does not have any hosting to another domain which has

Hello :)

Yes, ideally, you should simply update the name servers for the additional domain name to ones for the cPanel server. Then, add the domain name as a "Parked" or "Addon" domain name in the cPanel interface, depending on what you want to see in the address bar in your browser.

Thank you.