3

I'm considering setting up a mobile website. This site will be hosted on someone else's server with a domain such as: mysite.theirsite.com

My issue is that currently, mysite.com is decently ranked for some terms. Currently, my website is not mobile optimized, and I'm concerned with just going with a responsive design that some stuff might get messed up. Also, it is much "heavier" on the bandwidth.

I've been considering the mobile website, I like the crisp/clean mobile look. But, if I have a CNAME m.mysite.com alias tomysite.theirsite.com then although the user only sees m.mysite.com, Google will create duplicate content when they go to mysite.theirsite.com? Won't they?

Is there a way that I can avoid having Google index the mysite.theirsite.com if I do that?

1 Answer 1

3

A CNAME is not a redirect. Rather it is an alias.

If you put a CNAME record in DNS the host name will resolve to the same IP address as the other host name.

The webserver must be configured to handle the content. It has a choice:

  • Serve the same content as the other domain
  • Redirect to the other domain

It is the webserver that must make this important SEO decision. The type of DNS record has no bearing on how the site will perform from an SEO perspective.

It sounds like you want to configure the your webserver to redirect one of these domains to the other and avoid duplicate content. You generally want to choose 301 permanent redirects. How you configure your webserver to do the redirect will depend on which webserver you are running, and what kind of access you have to the configuration.

For example in Apache, it is best to create virtual host sections for each host name and put the redirect directive in the appropriate virtual host. However you may not have access to the Apache configuration to do so. In such a case you might have to put rewrite rules in your .htaccess file.

3
  • It is funny how many of these CNAME redirect questions we get. There must be some kind of misinformation out there or some kind of misleading labeling on a control panel or something. It would be nice to know.
    – closetnoc
    Commented Nov 19, 2014 at 1:54
  • I know what a CNAME is, and how it works. Sorry for using the wrong terminology. My concern is that if I have a CNAME record that points m.mysite.com to mysite.theirsite.com. It will be accessible by either URL. So, if someone (e.g. Google) goes to the URL pointing to mysite.theirsite.com and they index the content. Then, go to m.mysite.com and index the content. The content would appear as being duplicate. Is there a way to make it so ONLY m.mysite.com is accessible? Commented Nov 19, 2014 at 3:42
  • You would also have that problem if you put in an A record pointing to the same IP address. You need to configure your webserver to 301 redirect the subdomain under their site to your site. Commented Nov 19, 2014 at 11:14

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.