![]() |
Addon, Sub Domains and 301 redirect... HELP !
Hi
I have 3 domain names... domain.co.uk (main domain) * sub.domain.co.uk (sub) * test.domain.co.uk (sub) domain2.co.uk (addon) domain.com (addon) On domain.co.uk I have a subdomain 'sub.domain.co.uk' This is located 'public_html/sub' The 2 addon domains are both set to use the same path 'public_html/sub' So regardless of which way you access the site, you hit the same files etc... Ideally I only want users to visit via www.domain.com so would like to configure some for of permanent redirect.. I've been advised to do this using .htaccess and a 301 redirect. To test this I would like to try it with domain2.co.uk and have all it's traffic redirected to www.domain.com How do I do this as a test ?? How do I do it on the two .co.uk domain as a permanent redirect to the .com Will this effect google ranks ?? as domain.co.uk has a good placement. Hope this makes some for of sense.. Thanks |
Re: Addon, Sub Domains and 301 redirect... HELP !
Moved your thread from Web Hosting to SEO forum.
Quote:
1. Test it by typing the old domain and see if it redirects. 2. Check the server headers from any tool like http://www.seoconsultants.com/tools/headers.asp Quote:
Quote:
Quote:
|
Re: Addon, Sub Domains and 301 redirect... HELP !
Thanks
What do I need to do, if I only want this to happen to 1 of the domains for now.. ?? Then when I ready make it affect all domains ! ?? |
Re: Addon, Sub Domains and 301 redirect... HELP !
Put the thing in the .htaccess file of the domain you wish to do as of now. When you plan to apply the same to the other domains do the same for them as well.
|
Re: Addon, Sub Domains and 301 redirect... HELP !
Thanks.. I'll try it and see what happens..
Last question for now :) How do I add the subdomain and have the redirect to the new domain ?? |
Re: Addon, Sub Domains and 301 redirect... HELP !
Quote:
For redirecting you have to redirect use the same code I have given above with slight modification. Code:
RewriteEngine On |
Re: Addon, Sub Domains and 301 redirect... HELP !
Thanks :)
I've already got the subdomain.. just wondered how to redirect from it !! Does the .htaccess go in the root, or the subdomains root ?? |
Re: Addon, Sub Domains and 301 redirect... HELP !
Nope. In the root of the main domain.
|
Re: Addon, Sub Domains and 301 redirect... HELP !
Thanks again.. :)
I'm going to try this on one of my addon domains, which shares the same folder as my subdomain. |
Re: Addon, Sub Domains and 301 redirect... HELP !
Just tried this.. and found the following..
The domain I tried it on is an addon domain, it shares the same files as my sub domain. They are located MyUser\public_html\ROOT\test Test is the subdomains files... If I add the .htaccess to root, I get: www.newdomain.com/1$ If I add it to the sub domain directory it works.. Is this OK ? |
| All times are GMT +5.5. The time now is 18:05. |