How can I verify both www and non-www version of a website in WordPress using Webmaster Tools
Solution 1
Use an alternative verification method. For example, DNS TXT record ("Domain Name Provider").
Solution 2
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.
Solution 3
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.
Related videos on Youtube
Craig
Updated on September 18, 2022Comments
-
Craig over 1 year
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.
-
John Conde over 9 yearsYou don't want to verify both. Pick one and stick with it (and redirect the other to it).
-
Craig over 9 yearsGoogle WMT wants you to verify both and then pick the preferred version. My non-www is redirected to my WWW already.
-
-
Damn Terminal over 9 yearsYou don't need to verify both but Google recommends you do.
-
Stephen Ostermiller over 7 yearsI'm glad that you were able to verify both, but the question is asking how. Did you have to have a separate verification file for each? Were there redirects involved with the verification file? Did you use a verification method other than the file?
-
Stephen Ostermiller over 6 yearsWhat does "are the same filename as the domain" mean? Google gives you the same verification file for every domain in your Search Console account. The filename isn't tied to the domain, it is tied to the Google account.
-
MrWhite about 6 years"you can select the preferred version of your domain" - You can only do that when you have verified both www and non-www versions of your site.
-
MrWhite about 6 yearsYou shouldn't need to use an alternative verification method since it will be the same verification file for both www and non-www.