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
-
No: 'noindex' detected in 'robots' meta tag
Pages on my site show No: 'noindex' detected in 'robots' meta tag. However, when I inspect the pages html, it does not show noindex. In fact, it shows index, follow. Majority of pages show the error and are not indexed by Google...Not sure why this is happening. The page below in search console shows the error above...
Technical SEO | | Sean_White_Consult0 -
Why Doesn't All Structured Data Show in Google Webmaster?
We have more than 80k products, each of them with data-vocabulary.org markup on them, but only 17k are being reported as having the markup in Google Webmaster (GW). If I run a page that GW isn't showing as having the structure data in the structured data testing tool (http://www.google.com/webmasters/tools/richsnippets), it passes. Any thoughts on why this would be happening? Is it because we should switch from data-vocabulary.org to schema.org? Example of page that GW is reporting that has structured data: https://www.etundra.com/restaurant-equipment/refrigeration/display-cases/coutnertop/vollrath-40862-36-inch-cubed-glass-refrigerated-display-cabinet/ Example of page that isn't showing in GW as having structured data: https://www.etundra.com/kitchen-supplies/cutlery/sandwich-spreaders/mundial-w5688-4-and-half-4-and-half-sandwich-spreader/
Technical SEO | | eTundra0 -
WWW and Without WWW Backlinks
I have just seen through ahrefs and found without WWW have more backlinks instead of WWW. Is there any way to forward all those without WWW to WWW domain, is there any harm or effect in serp ranking?
Technical SEO | | chandubaba0 -
To integrate a blog tool onto site - or build a blog solution - what's better for SEO?
Currently looking at adding a blog to our company site subdirectory and wanted to know if there was a SEO distinction between the following methods: Integrating a bolt-on blog tool with the site to create the blog VS. just using the current site infrastructure to build blog functionality. What's better for SEO? (and if tool integration is the overwhelming response - which tool?). Cheers.
Technical SEO | | Oxfordcomma0 -
Searching in Google using the Site:www.example.com specification - is it in an order?
Hi Gurus, Just a quick searching question. If you do a Google search using the site: specification eg. site:www.example.com Is the list returned by Google in an order of something similar to 'Page Authority' or some other order eg. page first seen date etc. Because you are looking at your single site, is Google listing your pages back to you in it's perceived order of current 'popularity'? Thanks, Brad
Technical SEO | | BM70 -
Picking a URL co.uk vs .net vs .biz which is best for SEO?
Hi I was always told that you only want a .co.uk or a .com is this still true? I am setting up an ecommerce site and the ideal .co.uk is gone! Am I better to have a longer ulr with maybe a hifen or a uk in it or is it ok to have a .biz or a .net these days? You help would be greatly appreciated! Thanks James
Technical SEO | | JamesBryant0 -
What can I do if Google Webmaster Tools doesn't recognize the robots.txt file?
I'm working on a recently hacked site for a client and and in trying to identify how exactly the hack is running I need to use the fetch as Google bot feature in GWT. I'd love to use this but it thinks the robots.txt is blocking it's acces but the only thing in the robots.txt file is a link to the sitemap. Unde the Blocked URLs section of the GWT it shows that the robots.txt was last downloaded yesterday but it's incorrect information. Is there a way to force Google to look again?
Technical SEO | | DotCar0 -
Best practice: unique meta descriptions on blog 'tag' pages
Hi everyone, I'm curious, are there best practices for introducing unique meta descriptions on blog tag pages (I'm using wordpress)? For instance, using platinum seo, on an original post, the meta description is either the excerpt or a specified custom sentence. It doesn't appear that platinum seo allows for custom descriptions on tag pages. Love to hear your thoughts. Thanks! Peter
Technical SEO | | peterdbaron1