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
-
Using a 302 redirect for language variants. How should I use the canonical?
Hi there, I have a question regarding the canonical tag. The current setup is like so... www.site.com 302 redirects to.. www.site.com/de/ I want to add canonical tags on every page to avoid duplicate content but I'm not sure about the homepage. Should the canonical URL be www.site.com or www.site.com/de/ ? I'm concerned that I could be about to hurt my ranking. Thanks,
Technical SEO | | zuriwolf
Mitch0 -
Will a blog post about a collection of useful tools and web resources for a specific niche being seen as negative by google for too many links?
SEO newbie here, I'm thinking about creating a blog post about a collection of useful tools and web resources for my specific niche. It'd be 300 links or more, but with comments, and categorized nicely. It'd be a useful resource for my target audience to bookmark, and share. Will google see this as a negative? If so, what's the best way to do such a blog post? Thanks
Technical SEO | | ericzou0 -
Can I have an http AND a https site on Google Webmaster tools
My website is https but the default property that was configured on Google WMT was http and wasn't showing me any information because of that. I added an https property for that, but my question is: do I need to delete the original HTTP or can I leave both websites?
Technical SEO | | Onboard.com0 -
Has anyone had problems with google webmaster tools verified sites
Hi, i have just been into google webmaster tools and i have noticed that five of my websites are no longer verified. i have tried putting the code back into the head and also i have tried verifying it through google analaystics but nothing is working can anyone let me know what has happened and if anyone has noticed this regards
Technical SEO | | ClaireH-1848860 -
Can I format my H1 to be smaller than H2's and H3's on the same page?
I would like to create a web design with 12px H1 and for sub headings on the page to be more like 24px. Will search engines see this and dislike it? The reason for doing it is that I want to put a generic page title in the banner, and more poetic headings above the main body. Example: Small H1: Wholesale coffee, online coffee shop and London roastery Large h2: Respect the bean... Thanks
Technical SEO | | Crumpled_Dog
Scott0 -
Is it ok to just use the end of the url when using a Rel Cononical Link?
Hi, I am working with an account and the previous SEO used a Rel Canonical link that just uses the end of the url. Instead of the full url When I look it up on the web I see most people are using the full url. Is that the proper way to do it or does is suffice to just use the end of the url? Wanted to check before I take the time to change them all. -Kent
Technical SEO | | KentH0 -
404 Errors in Google Webmaster Tools
Hello, Google webmaster tools is returning our URLs as 404 errors: http://www.celebritynetworth.com/watch/D5GrrPEN9Oc/tom-mccarthy-floating/ When we enter the URL into the browser it loads the page just fine. Is there a way to determine why Google Webmaster Tools is returning a 404 error when the link loads perfectly fine in a browser? Thanks, Alex
Technical SEO | | Anti-Alex0