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
-
How to use Google search console's 'Name change' tool?
Hi There, I'm having trouble performing a 'Name change' for a new website (rebrand and domain change) in Google Search console. Because the 301 redirects are in place (a requirement of the name change tool), Google can no longer verify the site, which means I can't complete the name change? To me, step two (301 redirect) conflicts with step there (site verification) - or is there a way to perform a 301 redirect and have the tool verify the old site? Any pointers in the right direction would be much appreciated. Cheers Ben
Technical SEO | | cmscss0 -
Changes to 'links to your site' in WebMaster Tools?
We're writing more out of curiosity... Clicking on "Download latest links" within 'Links to your site' in Google's WebMaster Tools would usually bring back links discovered recently. However, the last few times (for numerous accounts) it has brought back a lot of legacy links - some from 2011 - and includes nothing recent. We would usually expect to see a dozen at least each month. ...Has anyone else noticed this? Or, do you have any advice? Thanks in advance, Ant!
Technical SEO | | AbsoluteDesign0 -
Site's IP showing WMT 'Links to My Site'
I have been going through, disavowing spam links in WMT and one of my biggest referral sources is our own IP address. Site: Covers.com
Technical SEO | | evansluke
IP: 208.68.0.72 We have recently fixed a number of 302 redirects, but the number of links actually seems to be increasing. Is this something I should ignore / disavow / fix using a redirect?0 -
Google using descriptions from other websites instead of site's own meta description
In the last month or so, Google has started displaying a description under links to my home page in its search results that doesn't actually come from my site. I have a meta description tag in place and for a very limited set of keywords, that description is displayed, but for the majority of results, it's displaying a description that appears on Alexa.com and a handful of other sites that seem to have copied Alexa's listing, e.g. similarsites.com. The problem is, the description from these other sites isn't particularly descriptive and mentions a service that we no longer provide. So my questions are: Why is Google doing this? Surely that's broken behaviour. How do I fix it?
Technical SEO | | antdesign0 -
Malware & Wordpress
Google has identified Malware on on eof our Wordpress sites. In webmaster tools it names the 10 pages where code has been injected. I cant' find them easily via the WP dashboard and wondered if anyone had had any experience of this and what steps they took? Plus are there any measure I can take to fight against this? The site is on the latest WP version. Thanks, Colin
Technical SEO | | NileCruises0 -
Webmaster Tools 404s
We try to keep our 404s in google webmaster tools to a minimum but in recent months, the volume has simply exploded to over 500k errors. 99.95% of this is complete spam linking to pages that never existed. Have tried marking as resolved but they just end up back in the list eventually and don't like the idea of 301ing so many links when the pages never existed in the first place. We can just ignore them all but this makes it hard to identify legitimate 404s that need redirecting as there is only so much data we can export out of WT. Has anyone had experience with returning 410s? Does google eventually drop these from WT?
Technical SEO | | jandunlop0 -
Google Webmaster tools vs SeoMOZ Crawl Diagnostics
Hi Guys I was just looking over my weekly report and crawl diagnostics. What I've noticed is that the data gathered on SeoMoz is different from Google Webmaster diagnostics. The number of errors, in particular duplicate page titles, content and pages not found is much higher that what google webmaster tools is represents. I'm a bit confused and don't know which data is more accurate. Please Help
Technical SEO | | Tolod0 -
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