: How can I verify both www and non-www version of a website in WordPress using Webmaster Tools How can I verify both www and non-www version of a website in WordPress if I'm using Yoast SEO
How can I verify both www and non-www version of a website in WordPress if I'm using Yoast SEO and there is only one verification file upload? I do not have access to the site's GA.
More posts by @Debbie626
7 Comments
Sorted by latest first Latest Oldest Best
I had the same problem - I found you just have to add the other version as a Property in Google Webmaster (ie if you have the www version already registered, add the non www version). If you click on Search Console in the upper left, it will take you to one of the initial pages for you to manage your sites, and the option to add another Property is on the top right (red button).
I then chose the same verification method as I used for the initial site (ie the other Property), and Google recognised my ownership of the new version (ie www version in my case). To get to the verification settings, in the newly added Property, first click the gear icon on the top right, then select Verification Details.
Both verification files are the same filename as same domain, so all you do is verify and upload the html to FTP and thats it.
What worked for me is I added both the www and non-www versions of the site I was working on as properties on Google Webmasters tool and verified ownership of both. I then proceeded to choosing the preferred version on the site settings. Done.
First of all the WWW and NON-WWW for the domain should never be an issues as in the world of the web is it the same, Wordpress and other CMS frameworks have made this to freaking complex over a non issue. If your site is setup right at the web server level it should be able to handle both out of the box. Apache and IIS allow for servername aliasing,
ServerName example.net
ServerAlias example.net (can have multiple)
If it is handled this way and use relative path on the urls and files then the www or non www is not an issue.
When you verify the 'www' prefix and the 'non-www' prefix using the same Webmaster Tools account, the verification file you download from Webmaster Tools is the same for both. So you only need to upload the single file, then you can verify both.
Use an alternative verification method. For example, DNS TXT record ("Domain Name Provider").
You don't need to verify both versions, The best you can do as per the SEO guidelines,
301 Redirect non-www to www using you .htaccess file. Once you are done with doing that do to the webmaster and only enter the URL with www to verify, Once verified you can select the preferred version of your domain to be with
If you want to keep the non-www as preferred URL then redirect www to non-www version and verify non-www version of your website in webmaster. Here is the redirection code
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.
RewriteRule ^(.*)$ www.%{HTTP_HOST}/ [R=301,L]
For more info see stackoverflow.com/questions/1659949/how-to-change-htaccess-to-redirect-all-non-www-links-to-www-pages
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.