Mobile app version of vmapp.org
Login or Join
Caterina187

: Confusion regarding SEO and a name, c name and 301 redirects I have a VPS with and a domain from different hosters. I would like to know about the best practices for setting up the redirects

@Caterina187

Posted in: #301Redirect #Dns #Seo

I have a VPS with and a domain from different hosters. I would like to know about the best practices for setting up the redirects regarding SEO as I am really confused about the different options.

I want everyone who access mysite.com to be redirected to mysite.com without having a negative impact on my SEO and I want my site to be displayed as example.com in the SERPS.

As far as I can tell I have the following options:

Option 1 (An A record and a CNAME, no redirects)

DNS Level
example.com A record pointing at the IP of my server example.com CNAME to example.com

Server Level
no redirects



Option 2 (Two A records, no redirects)

DNS Level
example.com A record pointing to my server example.com A record pointing to my server

Server Level
no redirects



Option 3 (301 Redirect using either of the above)

I can redirect the example.com domain to example com via htaccess.
Is there any difference SEO-wise based on how I set up the DNS in this case?

Also, what do you think is the best option (or is there a better one I'm missing??

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Caterina187

2 Comments

Sorted by latest first Latest Oldest Best

 

@Murray432

Everyone has their favorite way of doing this, so long as it's a 301 it's fine, all the methods you've shown are valid. Beyond using a 301 there is no real best practice because everyone's setup is different.

This is mine, using .htaccess

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.yourdomain.com$ [NC]
RewriteRule ^(.*)$ www.yourdomain.com/ [R=301,L]


It's a positive compare, basically, if the domain is NOT yourdomain.com it redirects to yourdomain.com with a 301.

No messing with DNS, no matter what domain the user/bot uses to visit the site they will always end up at yourdomain.com. It's bulletproof, works with search engines, and you can add new domains without changing any settings.

10% popularity Vote Up Vote Down


 

@XinRu657

In my experience, using the .htaccess method works great without any noticeable effect on search engine ranking. That said, it would be a very good idea to find any sites linking to you using the non-www version and ask them to change it to the www version.

For setting your preferences on the SERP, you can configure this in Google Webmaster Tools. See this article: support.google.com/webmasters/bin/answer.py?hl=en&answer=44231

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme