1

Google is indexing my site pages with the wrong domain prefix.

My site pages should be fetched as www.topspeedracer.com/url.html instead of mail.topspeedracer.com/url.html

Here is an example of the problem:

http://mail.topspeedracer.com/better-gas-mileage-in-summer-than-winter.html

The domain prefix should always be "www" but occasionally it is "mail" instead.

This problem started happening recently but I have made no changes to my site or server.

What is causing this and how do I fix it?

I am using Joomla version 1.5.9 in legacy mode 1.0

Any help would be greatly appreciated.

3
  • I could be wrong, but this sounds like a DNS issue, not Joomla!. Can you please provide your DNS settings for mail.topspeedracer.com? Commented Dec 10, 2014 at 5:11
  • Thanks for responding Zachary, according to mxtoolbox.com - mail.topspeedracer.com points to 69.94.8.39 which is the IP address that hosts my website topspeedracer.com. I don't understand why the subdomain I use for mail only is showing up as the domain prefix instead of "www". It looks like something is modifying the base href tag in my site pages if you look at the source code in the example url.
    – Topspeed
    Commented Dec 10, 2014 at 8:25
  • I can pretty much guarantee that this is your DNS or server configuration, not Joomla!, though I am not a DNS expert. If I go to topspeedracer.com/robots.txt I can see your robots.txt file which isn't processed by Joomla! at all, similarly if I go to mail.topspeedracer.com/robots.txt I still get to the same file. Commented Dec 10, 2014 at 21:59

1 Answer 1

1

Since you asked about Google...

The article really seems to cover everything I could think of. To avoid this being just a link, I'll pick one important part from there. Use a 301 redirect in .htaccess to redirect mail. addresses to www. addresses.

You can actually modify the general non-www to www rule I copied from the web:

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

This checks if the host does not start with the www prefix and if it doesn't adds the www. In your case that would result in www.mail. prefix so replace the second line with

RewriteRule ^(.*)$ http://www\.topspeedracer\.com/$1 [R=301,L]

You already know what the address is, so you don't need to use a variable. Add somewhere between Rewrite Engine On and the Joomla sef rewrite rules.

I have no real experience with .htaccess, so the rules might have errors. The basic idea of doing a 301 redirect is what you want, though.

1
  • Thanks for your help Ville. Will adding the code below redirect any requests that use the IP address and/or the wrong domain prefix? Is the syntax correct? RewriteCond %{HTTP_HOST} ^mail\.topspeedracer\.com RewriteCond %{HTTP_HOST} ^69\.94\.8\.39 RewriteRule (.*) www\.topspeedracer\.com/$1 [R=301,L]
    – Topspeed
    Commented Dec 22, 2014 at 22:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.