Canonicalization Issue On Bluehost Server After Installing A Dedicated IP On A Hosting Account

Posted by Justin Nwosu in Web Hosting on 08-06-2012

Tags: , , , , , ,

0

I have many add-on domains in one web hosting account on a Bluehost Server. Then, one day I noticed that one of my add-on domains, mexabet.biz, could be accessed through unwanted multiple locations – via other add-on domains. The examples are as follows:

http://mail.zestle.com/mexabet.biz/

http://mail.zinsolar.biz/mexabet.biz/

http://mail.zinsolar.com/mexabet.biz/

http://mail.devzeal.com/mexabet.biz/

http://mail.mexasoft.com/mexabet.biz/

The saddest thing about this was that Google indexed the web directory, mexabet.biz, as well as these “mail” sub-domains of my other add-on domains, thereby causing canonicalization issues. That was so bad for a website I worked extremely hard to optimize for search engines. An interesting thing was that I didn’t have any “mail” sub-domain for those add-on domains. When I contacted the Bluehost Support team to fix the issue, their initial response was that I didn’t configure the main account’s .htaccess well. They suggested a code to be placed in the .htaccess file; but it didn’t work. After several days, it was found out that the issue was simply because of installing the dedicated IP on a shared hosting account.  With a dedicated IP, going to mail.anydomain.com will load the main domain itself.  So when you go to mail.anydomain.com/mexabet.biz, it is as if you are typing in maindomain.com/mexabet.biz. Hence you are seeing the site when you go there.  The mail folder itself is never even being called or loading.  This has almost nothing to do with the .htaccess files, though the solution will ultimately lie in them.  So, the technical support I was getting was coming from less-knowledgeable technicians.

Here are the steps to fix the problem:

  1.  Create a new sub-domain called mail.domain.com and point it to the folder .mail in public_html. You’ll need to delete any existing zone files for the mail first using the DNS zone editor.
  2. Add the following code to the .htaccess file for the .mail folder:

RewriteEngine On

RewriteCond %{SERVER_PORT} =80

RewriteCond %{HTTP_HOST} ^mail(\.[^.]+)+$

RewriteRule .* http://%{HTTP_HOST}:2095 [R=301,L]

 

RewriteCond %{SERVER_PORT} =443

RewriteCond %{HTTP_HOST} ^mail(\.[^.]+)+$

RewriteRule .* https://%{HTTP_HOST}:2096 [R=301,L]

Each domain will need to have a mail sub-domain created and all will need to go to the .mail folder in the public_html.

The main confusion for a novice is how to delete any existing zone files for the mail first using the DNS zone editor. The record that needs to be removed to be able to create the mail sub-domain is the mail record found under the CNAME section. Once this is deleted, you’ll be able to create the sub-domain and the DNS record will also be automatically regenerated. In which case, you will want to:

  1. Log in to the DNS Zone Editor.
  2. Select the domain name we need to modify.
  3. Scroll down the cName section.
  4. Click delete next to the mail cname.
  5. Create the sub-domain.

Following the instructions, I successfully created the “mail” sub-domains for most add-on domains, with the exception of seven (7). In those seven add-on domains I got the following error messages, whenever I tried to create the “mail” sub-domains for them:

“Error from domain wrapper: mail.mexabet.org is owned by another user.”

“Error from domain wrapper: mail.mexasoft.com is owned by another user.”

I found out that these seven (7) domains were all set up with the mail DNS record as an A record, instead of cName. So for these, you would want to follow these steps:

  1. Log in to the DNS Zone Editor.
  2. Select the domain name we need to modify. If that doesn’t work, access it directly by typing the URL in the browser’s address bar like this: https://my.bluehost.com/cgi/dm/zoneedit?domain=mexasoft.com.
  3. Scroll down the A record section.
  4. Click delete next to the mail A record.
  5. Create the sub-domain.
DNS Records - A Records

DNS Records - A Records

If you’ve purchased a dedicated IP for your web hosting account on a Bluehost server and have multiple add-on domains, your add-on domains are likely suffering from this type of canonicalization issue. Try to access them one-by-one via the mail sub-domains of the others. And if that is the case, just follow the instructions given above to fix the issue.

Comments are closed.