Forum Moderators: phranque

Message Too Old, No Replies

301 sub-domain to main domain

best possible changes for successfull change over

         

Pass the Dutchie

7:12 am on Nov 20, 2007 (gmt 0)

10+ Year Member



After setting up sub domains for travel destinations england.mysite.com and spain.mysite.com etc I have revised the user friendliness and SEO impact of this idea and have decided to 301 these subdomains to the main site. This will consolidate the site, improve navigation, and help boost the poor performance of the main domain mysite.com

Each subdomain has about 500 inbound links. I intend to redirect three subdomains to the main domain. All sites are of the same topic, and I will use the same file structure as I do on the sub domains.

I would really appreciate any tips and ways to avoid being sand boxed.

Cheers

DB

Marcia

7:19 am on Nov 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you on IIS or Apache?

Pass the Dutchie

10:23 am on Nov 20, 2007 (gmt 0)

10+ Year Member



Hi Marcia,

Apache and it seems that I can only get RedirectMatch 301 to work. I

If I want to redirect one domain to another domain I get a error 500 if I use either:

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

or

Redirect 301 / http://www.newdomain.com/

[edited by: jdMorgan at 2:56 pm (utc) on Nov. 20, 2007]
[edit reason] de-linked [/edit]

jdMorgan

2:57 pm on Nov 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Where are you putting this code -- .htaccess, httpd.conf...?

Jim

Pass the Dutchie

6:13 pm on Nov 20, 2007 (gmt 0)

10+ Year Member



Hey Jim,

Thanks for the reply.

I have not yet set up the 301 redirect for the sub-domains in question.

However, I have tested the following .htaccess code which seems to work on my server:

RedirectMatch 301 / [mysite.com...]

Here is the Header report:

#1 Server Response: [mysite.com...]
HTTP Status Code: HTTP/1.1 301 Moved Permanently
Date: Tue, 20 Nov 2007 18:09:29 GMT
Server: Apache/2.2.3 (Debian) mod_python/3.2.10 Python/2.4.4 PHP/4.4.4-8+etch4
Location: [mynewsite.com...]
Content-Length: 374
Connection: close
Content-Type: text/html; charset=iso-8859-1
Redirect Target: [mynewsite.com...]

#2 Server Response: [mynewsite.com...]
HTTP Status Code: HTTP/1.1 200 OK
Content-Length: 13641
Content-Type: text/html; charset=UTF-8
Last-Modified: Fri, 16 Nov 2007 16:11:18 GMT

Should i use the same approach for the re-direct for the sub domains? Any other advice would be most appreciated.

Thanks in advance

DB

jdMorgan

6:24 pm on Nov 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are "mysite" and "newsite" in the same server -- Do they serve the exact same pages?

Jim

Pass the Dutchie

6:37 pm on Nov 20, 2007 (gmt 0)

10+ Year Member



Hi, yes the sub.domains and domains are hosted on the same server.

Pass the Dutchie

6:42 pm on Nov 20, 2007 (gmt 0)

10+ Year Member



Hi, yes the sub.domains and domains are hosted on the same server.

Not sure what you mean by: "Do they serve the exact same pages?"

Please note that the example I give of "mysite" and "mynewsite" is not referring to redirecting england.mysite.com to mysite.com/england/. This is an example of how the server is currently set up for another 301 domain re-direct.

jdMorgan

6:47 pm on Nov 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If they all serve pages from the same filespace, then the following should suffice to use www.newsite.com as the canonical domain, and redirect all others to it:

Options +FollowSymLinks
RewriteEngine on
#
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.mynewsite\.com
RewriteRule (.*) http://www.mynewsite.com/$1 [R=301,L]

However, depending on the number of subdomains you have and the number of pages in each, you may want go slow and redirect only one subdomain at a time (or a few at a time). You don't want to make the SEs have to recalculate PR/link-pop on your whole site all at once! (However, I will defer to the SE forums for the SEO side of this project.)

Jim

[edited by: jdMorgan at 8:43 pm (utc) on Nov. 20, 2007]

Pass the Dutchie

8:42 am on Nov 28, 2007 (gmt 0)

10+ Year Member



After some useful insight gained in the Google News [http] section I now have a better, although not complete idea of what I intend to do.

Most probably 301 each sub-domain with either of the two options:

(Example A)

location.domain to domain/location

However, I would prefer to do the following:

(Example B)

location.domain to domain/location
and a few pages like this:
location.domain/product/ to domain/product/

Any idea if Example B is a bad idea? If from a technical POV example B is not too difficult to achieve then I would rather go with this.

Please advise on the .htaccess code.

Thanks a million.