Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Search Engine Optimization (SEO) (http://www.go4expert.com/forums/seo-forum/)
-   -   Addon, Sub Domains and 301 redirect... HELP ! (http://www.go4expert.com/forums/addon-sub-domains-301-redirect-help-t3647/)

here's jonny 27Mar2007 23:34

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

shabbir 28Mar2007 08:03

Re: Addon, Sub Domains and 301 redirect... HELP !
 
Moved your thread from Web Hosting to SEO forum.
Quote:

Originally Posted by here's jonny
How do I do this as a test ??

2 Ways of doing this.
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
How do I do it on the two .co.uk domain as a permanent redirect to the .com

Go through the Sticky thread right at the begining of this forum and your questions will get solved but then also I will help you with the quotes from that thread.
Quote:

Originally Posted by SEO FAQ's
I just changed my domain name. How can I switch without losing my rankings?

You'll need to do a 301 redirect from the old domain to the new domain. Fortunately this is not difficult to do. You'll need to add the following lines of code to a file called .htaccess and place it in the root directory of the old domain:
Code:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?old-domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.new-domain.com/$1 [R=301,L]


Quote:

Originally Posted by here's jonny
Will this effect google ranks ?? as domain.co.uk has a good placement.

If you have a permanent redirect the things will slowly move and it will be a smooth transfer and theoretically nothing should happen to the rankings but no one can predict the practical aspects of it. Again I would suggest you to go through SEO FAQ's

here's jonny 29Mar2007 23:58

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 ! ??

shabbir 30Mar2007 07:31

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.

here's jonny 31Mar2007 23:18

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 ??

shabbir 1Apr2007 09:32

Re: Addon, Sub Domains and 301 redirect... HELP !
 
Quote:

Originally Posted by here's jonny
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 ??

For creating a sub-domain you have to consult your hosting provider.

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]

See the only thing differs is from www to sub-domain

here's jonny 1Apr2007 18:37

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 ??

shabbir 1Apr2007 19:27

Re: Addon, Sub Domains and 301 redirect... HELP !
 
Nope. In the root of the main domain.

here's jonny 1Apr2007 19:38

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.

here's jonny 1Apr2007 19:49

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 01:38.