How to solve this URL www. version error?

Thunder Digitals

Elite Member
Jr. VIP
Joined
Jun 9, 2020
Messages
6,583
Reaction score
3,258
Hey guys, Can anyone tell me how can I make one primary version of my website?

URL version.png


I want to make just .com primary version.

How can I solve it via file manager?

Thank you.
 
Using wordpress? Edit the .htaccess in the file manager (project root), and add the following:
Code:
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
It should look something like this
Code:
https://stackoverflow.com/a/1270281/1437261

If you are not sure, post the contents of your existing htaccess. Will give you the modified one. :)
 
Using wordpress? Edit the .htaccess in the file manager (project root), and add the following:
Code:
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
It should look something like this
Code:
https://stackoverflow.com/a/1270281/1437261

If you are not sure, post the contents of your existing htaccess. Will give you the modified one. :)
No, Its just a HTML site, But I can access .htcaccess from the file manager.
 
If you use CloudFlare, you can set all www requests to redirect to primary.

There is also a HTML tag to ensure search engines link the right URL.

Code:
<link rel="canonical" href="http://example.com" />
 
No, Its just a HTML site, But I can access .htcaccess from the file manager.
Alright then make it look like the stackoverflow answer I gave you. It should do the trick, given you have htaccess enabled.
 
When Google or SEO tools flag a www vs. non-www error, it means your site is accessible at both versions (e.g., example.com and www.example.com), which can hurt SEO due to duplicate content.
 
Hey @Gogol How do i deindex the www. version? It is still indexed in google.

Also, I thought about using the GSC URL remover tool, but it says, "All URL variations (www/non-www and HTTP/HTTPS) will be affected." So I don't think I can use this one.

Any other suggestions will be appreciated. Thank you.
 
Hey @Gogol How do i deindex the www. version? It is still indexed in google.

Also, I thought about using the GSC URL remover tool, but it says, "All URL variations (www/non-www and HTTP/HTTPS) will be affected." So I don't think I can use this one.

Any other suggestions will be appreciated. Thank you.
Perhaps try submitting the www version of the sitemap again. When the crawler sees that the new urls got redirected, it probably should update the index. Not a SEO expert though.
 
Back
Top