Masca Posted April 20, 2010 Share Posted April 20, 2010 Hi. I have 9 domains, but only 1 hosting account/website (sadly I really can't justify the expense of a hosting account for each domain, unless someone can recommend a REALLY cheap place where I can simply host 8 additional .htaccess files!). I would like all of the extra domains to be redirected to my main domain (just to give them a reason for existing really!) with 301 redirects for SEO reasons. However, sadly my domain host only offers 302 redirects. What effect would it have on search engines if I redirect all of my extra domains to a file such as www.mymaindomain.com/redirect.php which simply contains a 301 php header redirect and nothing else? Would I still risk being penalised for duplicate content due to the fact the the redirect from my domain host initially results in an HTTP status code of 'HTTP/1.1 302 Found' before going to a status code of 'HTTP/1.1 301 Moved Permanently', or would search engines treat this as a valid 301 redirect? Thank you! Any advice is much appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/199158-redirecting-multiple-domains-to-one-website-with-php/ Share on other sites More sharing options...
ignace Posted April 20, 2010 Share Posted April 20, 2010 If you have DNS access then you can change the Name Server setting to your NS of your main server. If they are all hosted on the same server you can adjust the CNAME settings so that all 8 domains refer to your main domain something like: www.main-domain.com A 10.0.0.1 www.main2-domain.com CNAME www.main-domain.com www.main3-domain.com CNAME www.main-domain.com .. Personally I use the latter to refer subdomains and I'm not entirely sure this also works for entire domains. Quote Link to comment https://forums.phpfreaks.com/topic/199158-redirecting-multiple-domains-to-one-website-with-php/#findComment-1045326 Share on other sites More sharing options...
Daniel0 Posted April 20, 2010 Share Posted April 20, 2010 It will work fine with "entire domains". DNS doesn't care about the concept of "sub-domains". Quote Link to comment https://forums.phpfreaks.com/topic/199158-redirecting-multiple-domains-to-one-website-with-php/#findComment-1045357 Share on other sites More sharing options...
Masca Posted April 20, 2010 Author Share Posted April 20, 2010 Many thanks for your replies ignace and Daniel0. My main domain is hosted on a shared server. Do I still have an NS specific to my domain? I've looked at my control panel, and the A record ends with 100, therefore suggesting that maybe it's used for more than one domain? Sorry, I'm not very familiar with DNS. Thanks again. Quote Link to comment https://forums.phpfreaks.com/topic/199158-redirecting-multiple-domains-to-one-website-with-php/#findComment-1045414 Share on other sites More sharing options...
ignace Posted April 20, 2010 Share Posted April 20, 2010 You always have a NS specific to your domain regardless of your type of hosting. The A-record contains an IP-address and you shouldn't care about that. Where are your other 8 domains hosted? Are they hosted on a separate shared hosting? Quote Link to comment https://forums.phpfreaks.com/topic/199158-redirecting-multiple-domains-to-one-website-with-php/#findComment-1045427 Share on other sites More sharing options...
Masca Posted April 21, 2010 Author Share Posted April 21, 2010 Yes, unfortunately they are hosted on a separate shared server. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/199158-redirecting-multiple-domains-to-one-website-with-php/#findComment-1045585 Share on other sites More sharing options...
ignace Posted April 21, 2010 Share Posted April 21, 2010 Are they all hosted with the same provider? If so, you can ask your provider to refer all other 8 domains to your main domain this means that you would no longer have to pay for those 8 servers except domain registration fees Quote Link to comment https://forums.phpfreaks.com/topic/199158-redirecting-multiple-domains-to-one-website-with-php/#findComment-1045649 Share on other sites More sharing options...
Masca Posted April 28, 2010 Author Share Posted April 28, 2010 Hi. Sorry, I've been away from the PC for the last week. No, the 8 other domains are registered elsewhere. I don't currently have any hosting with them, and only pay for the domain registration renewals. I might move my main domain and hosting later this summer (so all of them could then be together), but I would like a solution in the meantime if possible. Thanks again for your continue help ignace. Quote Link to comment https://forums.phpfreaks.com/topic/199158-redirecting-multiple-domains-to-one-website-with-php/#findComment-1049835 Share on other sites More sharing options...
ignace Posted April 28, 2010 Share Posted April 28, 2010 No, the 8 other domains are registered elsewhere. I don't currently have any hosting with them, and only pay for the domain registration renewals. Just redirect those 8 domains to your main domain domain.com A 11.12.13.14 Quote Link to comment https://forums.phpfreaks.com/topic/199158-redirecting-multiple-domains-to-one-website-with-php/#findComment-1049838 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.