Best Practice for www and non www
-
How is the best way to handle all the different variations of a website in terms of www | non www | http | https?
In Google Search Console, I have all 4 versions and I have selected a preference.
In Open Site Explorer I can see that the www and non www versions are treated differently with one group of links pointing to each version of the same page. This gives a different PA score.
eg.
- http://mydomain.com DA 25 PA 35
- http://www.mydomain.com DA 19 PA 21
Each version of the home page having it's only set of links and scores.
Should I try and "consolidate" all the scores into one page?
Should I set up redirects to my preferred version of the website?
Thanks in advance
-
thanks for your answer
that was helpful
-
Thanks for taking the time to put together such a wonderfully detailed answer.
-
Hi Samantha,
What you have is what are called "canonical issues." By allowing multiple versions of your domain open and crawlable to search engines you "split" your ranking authority and result in the issues you are seeing right now.
The best practice is to choose one version of your domain as the "true canonical" and then 301 redirect the others at the server level by means of mod_rewrite code. Doing so will consolidate your content, incoming links and PageRank and greatly increase the root domain authority of your site.
To search engines, if your site hasn't instituted 301 redirect commands at the server level, all of these versions of your site home page would be treated as "separate pages" and each would accumulate authority individually:
http://yoursite.com/
http://www.yoursite.com/
http://yoursite.com/index.php
http://www.yoursite.com/index.php
https://yoursite.com
https://www.yoursite.comYou get the idea.
Most websites are run on one of three different types of servers...
- Unix-based servers running Apache.
- Unix-based servers running Nginx.
- Microsoft Windows-based servers running IIS or similar.
If you're unsure of what kind of server runs your site, ask your hosting company. Most sites are run on Unix-based servers with Apache. In that case, the server's behavior is configured using something called the .htaccess file.
If your site's root domain already contains a
.htaccess
file, you can simply scroll to the end of whatever code is already there and append your 301 redirect code at the bottom of the file, starting on a new line. While this may sound complicated, it's actually very, very simple to do. If you can upload files to and from your Web server, then chances are you'll have no trouble managing (i.e. altering or creating and uploading) your.htaccess
file(s).But yes, bottom line, you ALWAYS want to consolidate URLs and present one uniform "preferred" URL format to search engines and users. In your case, that would appear to the be the non-www domain which has the higher Domain Authority.
You can learn all about redirection best practices at the Moz resource here: https://moz.com/learn/seo/redirection
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
301 Clean-Up - Best Practices & Procedure?
Hello Again, I have taken over managing a website for about 2 months and have fixed a whole heap of problems. Im now turning my attention to the URL rewrites as there are ALOT of them. I have fixed the most problematic offenders that were blocking products and all sorts of mischief but I now want to clean them up. The website is on Magento, and there are 240 custom URL rewrites. Question 1: Am i correct that I should edit the links on my website so that they link directly to the new page instead of utilising the re-direct for best SEO results. Question 2: If my website doesn't utilise the URL rewrite (fixed in question 1) its only purpose is to transfer link juice from any external link the page had before. If this page didnt have any external inbound links then I can delete the URL rewrite as it serves no purpose. Question 3: If Q1 and Q2 are correct, what is the quickest way to check the inbound links to a page quickly so I can make a quick decision on if i should remove the re-write. Many Thanks in advance!
Technical SEO | | ATP1 -
Disallow: /404/ - Best Practice?
Hello Moz Community, My developer has added this to my robots.txt file: Disallow: /404/ Is this considered good practice in the world of SEO? Would you do it with your clients? I feel he has great development knowledge but isn't too well versed in SEO. Thank you in advanced, Nico.
Technical SEO | | niconico1011 -
Best practice for author tags: G+ personal or G+ company page?
I work for a company that has a corporate G+ page. I have a personal G+ page. When I write articles for the company blog there are 2 questions that come up: (1) for the rel="author" tag within the blog posting on the company's blog, should I reference my personal G+ page, or the company's G+ page as the author? (2) which G+ page, mine or my company's, should share the link to the blog posting on the company's site? Or should both share it? My goal is to build up author rank for either me or the company I work for (don't care which) so that after a while the Google organic search listing will include the author thumbnail if the article ranks for the search query. I don't care if the thumbnail is me or my company; just trying to figure out how to best link everything to maximize the chance of getting an author thumbnail in the search rankings. Thanks!
Technical SEO | | scanlin0 -
What is the best URL designed for a product page?
Should a product page URL include the category name and subcategory name in it? Most ecommerce platforms it seems are designed to do have the category and sub-category names included in the URL followed by the product name. If that is the case and the same product is listed in more then 1 category and sub-category then will that product have 2 unique urls and as a result be treated as 2 different product pages by google? And then since it is the same product in two places on the site won't google treat those 2 pages as having duplicate content? SO is it best to not have the category and sub-category names in the URL of a product page? And lastly, is there a preferred character limit for a URL to be less than in size? Thanks!
Technical SEO | | gallreddy0 -
Www vs non-www which is better?
Is it better to have all your pages point to the www version or non www version.
Technical SEO | | bronxpad0 -
Anchor Text the best way to use it
Hi i am wanting to gain links to my site and make the links relevant and have seen many sites that do not have the keyword on their site and have been told as well as having the keywords in the image that they will also have anchor text from other sites. Can anyone please tell me the important of anchor text and how i should use it. Is it wise to build anchort text links within your own site and what other sites should you be looking for. I have used a few article sites to gain anchor text links but most of these are no follow which does not help me. any advice would be great
Technical SEO | | ClaireH-1848860 -
Internal vs external blog and best way to set up
I have a client that has two domians registered - one uses www.keywordaustralia.com the other uses www.keywordaelaide.com He had already bought and used the first domain when he came to me I suggested the second as being worth buying as going for a more local keyword would be more appropriate. Now I have suggested to him that a blog would be a worthy use of the second domain and a way to build links to his site - however I am reading that as all links will be from the same site it wont be worth much in the long run and an internal blog is better as it means updated content on his site. should i use the second domain for blog, or just 301 the second domain to his first domain. Or is it viable to use the second domain as the blog and just set up an rss feed on his page ? Is there a way to have the second domain somehow 'linked' to his first domain with the blog so that google sees them as connected ? NOOBIE o_0
Technical SEO | | mamacassi0 -
Best Joomla SEO Extensions?
My website is a Joomla based website. My designer is good, but I don't think he knows that much about SEO . . . so I doubt if he added any extensions that can assist with SEO. I assume there are some good ones that can help my site. Does anyone know what/which Joomla extensions are must haves?
Technical SEO | | damon12120