Forum Moderators: phranque

Message Too Old, No Replies

Found mail.mysite.com in Google results

And actually mail.mysite.com shows mysite.com

         

Lexur

10:45 am on Apr 6, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I didn't changed anything in the DNS configuration for years and suddenly I discovered thousand of results in Google in the mail subdomain: the whole site duplicated.

This is my DNS setup:

355.256.981.737 / 24 PTR mysite.com.
ftp.mysite.com. CNAME mysite.com.
mysite.com. NS ns2.mysite.com.
mysite.com. NS ns1.mysite.com.
mysite.com. A 355.256.981.737
mysite.com. MX (10) mail.mysite.com.
mail.mysite.com. A 355.256.981.737
ns1.mysite.com. A 644.496.200.299
ns2.mysite.com. A 644.496.200.298
www.mysite.com. CNAME mysite.com.

Is this line "mail.mysite.com. A 355.256.981.737" unnecesary or badly formatted? It's not really an A record?

There is another reason to see those the pages into the mail subdomain?

Brett_Tabke

12:00 pm on Apr 6, 2011 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month


I think I know what you are referring too, so let me take a shot. You could fix this specific problem by adding this to your htaccess.

RewriteCond %{HTTP_HOST} ^yoursite\. [OR]
RewriteCond %{HTTP_HOST} ^mail\.yoursite\. [NC]
RewriteRule ^(.*) http://www.yoursite.com/$1 [R=301,L]

That however, does not fix the apparent wildcard issue you have going on. That issue will require the proper syntax from the moderator here ;-) You are going to have to use a ! not syntax and I am unsure of the proper syntax for that.

Lexur

12:54 pm on Apr 6, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month


Do you know if [i]a famous webmaster's forum[/i] uses this line in the .htaccess?
When I point the browser to http://mail.famouswebmastersforum.com there's no response but I have one if I ping this address.

In my website both, http and ping, give me response for the mail subdomain.

Brett_Tabke

1:31 pm on Apr 6, 2011 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month


if by famouswebmastersforum.com you mean this one, then it does not apply, because we use multiple servers for various services.

However, we do use that line on the webserver... try http://www.webmasterworld.com and see where you end up.

Lexur

9:11 am on Apr 9, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



if by famouswebmastersforum.com you mean this one


What a modesty!
You're great. ;-)

jdMorgan

11:44 pm on Apr 14, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Here's the 'stock answer' most often posted in this forum:

# Redirect all non-blank non-canonical hostname requests to canonical hostname
RewriteCond %{HTTP_HOST} !^(www\.yoursite\.com)?$
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [R=301,L]

This redirects all 'incorrect' hostname requests that land on this server to the correct hostname. This includes non-canonical subdomains, FQDN-format hostnames (trailing period), appended port numbers, and --although it's not at all critical, except to prevent the possibility of 'ugly' URLs appearing in second-tier search engines due to clever competitors-- casing errors.

The provision for blank hostnames prevents a self-inflicted DOS attack if a resource on your site is requested by a true HTTP/1.0 client or a malicious client. True HTTP/1.0 clients do not (i.e. cannot) send an HTTP Host header, and so that header's value cannot be depended on to always be present. Note that although this only applies to servers which have a unique IP address (and thus can have any domain pointed at them), it is simply cheap insurance to include the blank-hostname exclusion.

Jim

Lexur

5:46 am on Apr 15, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks jdMorgan.

In this server I had two issues: these we're talking about and a lot of Google search results with part of the the IP number; when I try to click there I always go to a 404 page. Very strange. I.e.: if my IP is 1234.56.78.9, Google shows results for 1234.56.0.78.

Even more, I can't use your global solution because I have a Wordpres MU in this server and, as they have the best blog software, the Wordpress crowd have declared themselves more smart than you and me and they decided the www subdomain is "deprecated".