Wordpress & use of 'www' vs not for webmaster tools - explanation needed
-
I am having a hard time understanding the issue of canonization of site pages, specifically in regards to the 'www' or 'non-www' versions of a site. And specifically in regards to wordpress.
I can see that it doesn't matter whether you type in 'www' or not in the url for a wordpress site, what is going on in the back end that allows this?
When I link up to google webmaster tools, should i use www or not?
thanks for any help
d
-
Thanks Christopher.
Sorry I'm not quite sure what the code you have supplied is for? My site currently works fine with or without the 'www' - but does the code you have supplied acheive something else?
thanks
d
-
The issue is www.EXAMPLE.com and EXAMPLE.com are considered two different websites, and Google may split the links in if people are linking to both versions. A 301 redirect tells Google to assume all links are pointed at one version.
Your Question: I can see that it doesn't matter whether you type in 'www' or not in the url for a wordpress site, what is going on in the back end that allows this?
My Answer: This is not WordPress, it is your web host. Most LAMP webhosts will automatically server your website with our without "WWW". WordPress will create the links on the pages it creates to the one specified in your settings, but the site will come up weather or not you use "WWW."
To Address the Concern: Because you are using WordPress, you are probably on Apache, so add this to your .htaccess file in the root directory.
After:
END WordPress
Add:
Rewrite all old filenames RewriteEngine on
Options +FollowSymlinks
rewritecond %{http_host} ^EXAMPLE.com [nc] rewriterule ^(.*)$ http://www.EXAMPLE.com/$1 [r=301,nc]Test with and without "WWW." Test with a different browser.
-
Hi Joseph, do you run into any SSL errors by using absolute links especially with images? I hate when you get an error message on secure pages saying that some content is not secure would you like to see it... do you think leaving the http part out is a better idea for sites that have SSL pages, use something like www.mydomain.com instead?
Thanks!
-
Hello David,
When you install wordpress it installs the files which can be found with or without the www.
On the settings page you can add the www as the version you want to use.
What is going on in the back that allows this ? => ( .htacess file re-write rules)
Your host should have rewrite rule available via .htacess file This will rewite all the pages on the site to which ever version you choose.
then in your webmaster account choose the www. version as well.
Redirecting your site to one version or the other is going to reduce two versions of your site down to one version so you do not have duplicate content issues or penalties.
I always use the full url (absolute link) with the www.for several reasons below.
This should always be used in your links within your site and the code as well.
Absolute link example is = http://www.your-site-url.com
-
easier and faster for search engines to follow
-
safer when worried about site hijacking
-
works better in emails ( make sure a visitor gets to the right page)
-
better if your content gets stolen and the thief does not take time to check and fix all the code (i actually caught someone who stole one of my sites content this way )
If you use one version all the time you are also going to make sure you get all your link benefits to the right domain and not split between the two.
Some seo's and many web designers don't use the full url to save time and code bloat of the site. Myself as well as many other think the absolute link has added benefits.
I hope that helps.
-
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
-
Worth redirecting non-www to www due to higher page authority with www?
When checking my domain I receive higher page authority for www vs non-www. I am considering moving to the www url and applying the necessary redirections but wanted to quickly check if this is worth it. The root page authority https://www.diveidc.com : PA 40 https://diveidc.com : PA 35 By redirecting would I just be transferring over negative signals to the www domain, thus voiding the point for doing any redirect at all?
Technical SEO | | MAGNUMCreative0 -
Moving wordpress to it's own server
Our company wants to remove wordpress from our current windows OS server at provider 1 and move it to a new server at provider 2. Godaddy handles our DNS. I would like to have it on the same domain without masking. I would like to make a DNS entry on godaddy so that our current server and our new server can use the same URL (ie sellstuff.com). But I only want the DNS to direct traffic to our current server. The goal here is to have the new server using the same URL as the old server so nothing needs to be masked once traffic is redirected with a 301 rule in the htaccess file. But no traffic outside of the 301 rule will end up going to the new server. I would then like to edit the htaccess file on our current server to redirect to the new servers IP address when someone goes to sellstuff.com/blog. Does this make since and is it possible?
Technical SEO | | larsonElectronics0 -
Canonical issues using Screaming Frog and other tools?
In the Directives tab within Screaming Frog, can anyone tell me what the difference between "canonicalised", "canonical", and "no canonical" means? They're found in the filter box. I see the data but am not sure how to interpret them. Which one of these would I check to find canonical issues within a website? Are there any other easy ways to identify canonical issues?
Technical SEO | | Flock.Media0 -
WWW to Non-WWW = Less Indexing?
Hi all, About 10 months ago we changed all of our urls to redirect to a non-www vs. the www because it was creating both iterations and therefore duplicate content. We didn't change anything in Webmaster Tools and it looks like our indexing went down significantly. Is this a problem? How can I fix it? *It looks like GWT also went through an update at that time? klxJ7gl
Technical SEO | | Becky_Converge0 -
Webmaster Tools finding phantom 404s?
We recently (three months now!) switched over a site from .co.uk to .com and all old urls are re-directing to the new site. However, Google Webmaster tools is flagging up hundreds of 404s from the old site and yet doesn't report where the links were found, i.e. in the 'Linked From' tab there is no data and the old links are not in the sitemap. SEOmoz crawls do not report any 404s. Any ideas?
Technical SEO | | Switch_Digital0 -
Using Canonical URLs option in Platinum SEO for Wordpress
SEOMOZ says that my site has 150 <a title="Click for Help!">Canonical URLs and lists that as a potential problem. It's a check box in the settings for Platinum SEO and here is the description it provides:</a> <a title="Click for Help!">Choose this option to set up canonical URLs for your Home page, Single Post, Category and Tag Pages.</a> I have the option engaged. So I was trying to figure out the best thing to do. I have already instructed it to automatically make 301 redirects for any permalink changes and have instructed it to "noindex" tag archives,rss comment feeds, and rss feeds. I've only been doing this for about a year and am really confused right now. After reading most of your posts about the subject I have a much better understanding, but still very confused. Help..Please...
Technical SEO | | pressingtheissue0 -
Www vs non www and understanding opensite
Hi Guys, New guy here with some questions regarding the difference between www and non www. I am helping with a site at the moment and gradually working my way through bits and learning all the time. I was watching one of the seomoz videos and it brought my attention back to www vs non www. I understand that google will treat these as two seperate sites but wanted to check what the stats are telling me. I was under the impression that www.mydummysite.com was getting most links etc as this is what I have always used. However when I used Opensite explorer it told me something different as follows: www.mydummysite.com 32/100 29/100 5 16 mydummysite.com 32/100 29/100 2 1,500 Am i correct in saying that i should be adding a redirect from www.mydummysite.com to mydummysite.com ???? I am thinking that this is telling me that I am potentially missing out on 1,500 links to my site but it could mean I am missing out on just 16. Eitherway I guess its something I should fix right? Do I just redirect that page or would all pages beneith it such as mydummysite.com/news also need redirect??? Can i use Canonical Rel links for this now? Thanks for taking the time to read and reply! 🙂
Technical SEO | | wedmonds0 -
If I redirect my WordPress blog to my main site, will it help my main site's SEO?
I have separate sites for my blog and main website. I'd like to link them in a way that enables the blog to boost my main site's SEO. Is there an easy way to do this? Thanks in advance for any advice...
Technical SEO | | matt-145670