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
|
Go4Expert Founder
|
![]() |
| 28Mar2007,08:03 | #2 |
|
Moved your thread from Web Hosting to SEO forum.
Quote:
Originally Posted by here's jonny 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:
Originally Posted by here's jonny Quote:
Originally Posted by SEO FAQ's Quote:
Originally Posted by here's jonny |
|
Go4Expert Member
|
|
| 29Mar2007,23:58 | #3 |
|
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 ! ?? |
|
Go4Expert Founder
|
![]() |
| 30Mar2007,07:31 | #4 |
|
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.
|
|
Go4Expert Member
|
|
| 31Mar2007,23:18 | #5 |
|
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 ?? |
|
Go4Expert Founder
|
![]() |
| 1Apr2007,09:32 | #6 |
|
Quote:
Originally Posted by here's jonny For redirecting you have to redirect use the same code I have given above with slight modification. Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(sub-domain\.)?old-domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.new-domain.com/$1 [R=301,L]
|
|
Go4Expert Member
|
|
| 1Apr2007,18:37 | #7 |
|
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 ?? |
|
Go4Expert Founder
|
![]() |
| 1Apr2007,19:27 | #8 |
|
Nope. In the root of the main domain.
|
|
Go4Expert Member
|
|
| 1Apr2007,19:38 | #9 |
|
Thanks again..
![]() I'm going to try this on one of my addon domains, which shares the same folder as my subdomain. |
|
Go4Expert Member
|
|
| 1Apr2007,19:49 | #10 |
|
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 ? |


