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
-
Weird Google indexing issues with www being forced
IM working on a site which is really not indexing as it should, I have created a sitemap.xml which I thought would fix the issue but it hasn't, what seems to be happening is the Google is making www pages canonical for some of the site and without www for the rest. the site should be without www. see images attached for a visual explanation.
Technical SEO | | Donsimong
when adding pages in Google search console without www some pages cannot be indexed as Google thinks the www version is canonical, and I have no idea why, there is no canonical set up at all, what I would do if I could is to add canonical tags to each page to pint to the non www version, but the CMA does not allow for canonical. not quite sure how to proceed, how to tell google that the non www version is in fact correct, I dont have any idea why its assuming www is canonical either??? k11cGAv zOuwMxv0 -
Last Part Breadcrumb Trail Active or Non-Active
Breadcrumbs have been debated quite a bit in the past. Some claim that the last part of the breadcrumb trail should be non-active to inform users they have reached the end. In other words, Do not link the current page to itself. On the other hand, that portion of the breadcrumb would won't be displayed in the SERPS and if it was may lead to a higher CTR. Foe example: www.website.com/fans/panasonic-modelnumber panasonic-modelnumber would not be active as part of the breadcrumb. What is your take?
Technical SEO | | CallMeNicholi0 -
Best & easiest way to 301 redirect on IIS
Hi all, What is the best and easiest way to 301 redirect URLs on IIS server? I got access to the FTP and WordPress back office, but no access to the server admin. Is there an easy way to create 301 redirect without having to always annoy the tech in charge of the server? Thanks!
Technical SEO | | 2MSens0 -
Help! www and non-www urls are driving me mad!
Sorry folks, I'm a very recently joined member, and after a five year gap in creating websites, I've decided to get back into the saddle and start again. Boy how things have changed! I'm soaking up all sorts of information from everywhere I can to get up to date with these changes, but I've come across this www v non-www problem in a big way. I realise there are already posts in here about this, but each time I read them, my mind seems to slip into some sort of loop that does not get anywhere. Basically, I think Google has indexed most of my pages as non-www, and only a hadful as www's. I have opened two accounts in Google Webmaster Tools for both www and non-www, and declared my preference for both accordingly. That was two days ago. As unprofessional as it may sound, I use Serif Web Plus X6, simply beacause it did the job six years ago, and it's all I know until I find and teach myself something better. My question is this - I can only create one page on X6, and yet there are two versions indexed in Google (although not all of them). I can only amend the one page that exists in X6, so how do I canonicalize two pages when there's the only version I have access to amending? Or am I miissing the point??? I hope that made sense?! I wouldn't mind, but I specified that I didn't want the site to be indexed yet with 'no follow', as it's nowhere near finished, but for some reason (probably due to placing Adsense ads on there) Google went ahead and indexed it anyway! The site is either http://www.cushioncutengagementringsstore.com or http://cushioncutengagementringsstore.com, depending on how you look at it! Any light you can shed on this would be gratefuly received! Thanks. Cem.
Technical SEO | | ConwyWebDesign0 -
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 -
New Magento shop - how to best avoid duplicate content?
Hi all, My clients are about to have th elatest version of the free Magento store set up. It will sell in at least to different languages, so this need to be taken into account. Could any of you give some advice on what is the best way to avoid DC (if possible)? The shop is by now clean (from dc) but from experience I konw this will no continue... Thanks, Best regards, Christian
Technical SEO | | sembseo0 -
Best Way To Handle Expired Content
Hi, I have a client's site that posts job openings. There is a main list of available jobs and each job has an individual page linked to from that main list. However, at some point the job is no longer available. Currently, the job page goes away and returns a status 404 after the job is no longer available. The good thing is that the job pages get links coming into the site. The bad thing is that as soon as the job is no longer available, those links point to a 404 page. Ouch. Currently Google Webmaster Tools shows 100+ 404 job URLs that have links (maybe 1-3 external links per). The question is what to do with the job page instead of returning a 404. For business purposes, the client cannot display the content after the job is no longer available. To avoid duplicate content issues, the old job page should have some kind of unique content saying the job is longer available. Any thoughts on what to do with those old job pages? Or would you argue that it is appropriate to return 404 header plus error page since this job is truly no longer a valid page on the site? Thanks for any insights you can offer.
Technical SEO | | Matthew_Edgar
Matthew1 -
How do I redirect non www pages to www on a windows server?
As the .htaccess file cannot be worked on, I added this php code 301 redirect if the URL does not contain a www on all the pages (small website - 10 pages) : header( "HTTP/1.1 301 Moved Permanently" ); header( "Location: $location" ); I want to know if this is ok for SEO? Has anyone done this on a windows server? Or if you have any better methods, it would be great if you can share. Please help. Thanks.
Technical SEO | | ArjunRajkumar0