I posted this on SEOChat but hopeing someone can help me out with this one. I have a subdomain that mirrors my domain name and I need to be able to 301 redirect it site wide for Google. Meaning Google will come into the subdomain and be redirected to the domain with the same exact URL attached. Redirect: sub.domain.com/aboutus/links.html to www.domain.com/aboutus/links I know 301 can do this on a page by page basis but I have 30000 pages so that would take too long or it can redirect the entire subdomain to the main domain's homepage but I dont want to do this because I want the weight to be passed to the right pages. I'm trying to remove this sub domain entirely but safely for Google because most pages rank well in Google and I dont want to loose this. Any help would be appreciated. Thanks
Opps. Cool and will this keep the URL intact??? This isn't a redirect to just the homepage is it??? So: sub.domain.com/links.html qill redirect to: www.domain.com/links.html right?? You can also redirect domain.com to www.domain.com with that correct? Thanks alot
Correct... it's what I use with our old domains... www.data-point.com for example and digitalpoint.com (without www). Try a few... http://www.data-point.com/~shawn/ http://digitalpoint.com/ http://www.optigold.com/products/isp/ or any page within the domains... - Shawn
All we do on our FreeBSD servers for this type of thing is setup a symbolic link. For every domain we host in the form www.yourdomain.com we setup a symbolic link to it in the form yourdomain.com==>www.yourdomain.com. I've asked my technicians about all the other methods and they can never see any reason for implementing them, because our method seem to work perfectly. The command from a root prompt to setup the link is: ln -s www.yourdomain.com yourdomain.com
No. The non "www" version is simply acts as an alias for the "www" version.There is only one set of data on the hard drive and that is in the "www.compar.com" directory. Here is the listing from the server: "lrwxr-xr-x 1 root www 14 Aug 21 2002 compar.com -> www.compar.com". To try it access my site using www.compar.com and then access it using compar.com. Shawn you asked "Doesn't that setup give you domains with duplicate content?" I suspect you really mean URLs with the same content and to that extent I guess it does. The trick is to never have any links go to "compar.com". But if someone tries to find your page without typing the "www" it will take them to the site and that is the real point is it not?
Actually no. The point is that if someone types in or links to "domain.com" they get redirected (safely) to www.domain.com. This keeps all your backlinks in one domain. Keeps your search engine listings with one domain name. Also if you have a sub domain you want to get rid of a user will be redirected to www.domain.com and Google will reindex it as such.
Ok, lets say I want to do this with zhdbdtd.com and want to make it www.zhdbdtd.com I've tried this and works great...except.....when my site changes to https it tries to revert back to the zhdbdtd.com and not use the www, but it cant, so it never becomes secure. Is there a way to do this but exclude https calls so it stays using the www? Also, can your suggestion be used in .htaccess instead of conf?
There probably is a way to do it with one of the variables available with a RewriteCond... you can find them here: http://httpd.apache.org/docs/mod/mod_rewrite.html#RewriteCond - Shawn