Forum Moderators: Robert Charlton & goodroi
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
<link rel="canonical" href="http://mysite.com/..pathtopages.html"> I also read that I could use my htaccess file to create 301 redirects for all of these subdomains to the main www site.
[edited by: phranque at 3:26 am (utc) on Jan 10, 2014]
[edit reason] exemplified domain [/edit]
[edited by: Robert_Charlton at 3:27 am (utc) on Jan 10, 2014]
[edit reason] delinked mysite.com - use example.com, which doesn't autolink [/edit]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.example\.com$ [NC]
RewriteCond %{HTTP_HOST} ^mail\.example\.com [NC]
RewriteCond %{HTTP_HOST} ^smtp\.example\.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
</IfModule>
We do use subdomains files. and time. which are not represented in goDaddy and are controlled somewhere else, I've asked my colleague to send me the list of legitimate sudomains in addition to those.
http://subdomain.example.com But I'm not getting redirected when I try any of these that are being indexed by Google:
301 redirecting all subdomains in the web server's .htaccess file shouldn't have any effect on the other subdomains on other ip's
But I'm not getting redirected when I try any of these that are being indexed by Google:
[edited by: Robert_Charlton at 12:09 am (utc) on Jan 15, 2014]
[edit reason] removed specific tool link, per forum Charter [/edit]
When I put in any random subdomain, for example hithere.example.com it returns the same page everytime, a little graphic that says "Sorry this site is not currently available". I'm assuming its getting this .jpg from my server (im about to go look for this) and that someone in the past setup the server to respond this way.