: How do I fix the crawl errors from Google Search Console where all my URLs end with htmlprint instead of html? I moved from Blogger to Wordpress. I set my prefered domain to non-www in
I moved from Blogger to Wordpress. I set my prefered domain to non-www in webmaster tools. I submitted a sitemap. My website is OK when I browse it. Links from other sites to my pages are well formed. In webmaster tools every page URL has a 404 complement ending with .htmlprint
Is there any way to remove this "print" from my website? Must I redirect every link with .htmlprint to .html?
More posts by @Becky754
1 Comments
Sorted by latest first Latest Oldest Best
Somewhere your site is linking to the "htmlprint" version. The first thing to do is figure out where that broken link is and fix it. View the source of your page and search for "htmlprint".
Instead, it is possible that Googlebot is misinterpreting JavaScript code in your page. Googlebot tries to execute JavaScript to find URLs. You may have something like document.location + "print" somewhere in your JavaScript. If so, there is no urgent need to fix it, Googlebot is just being stupid.
The third possibility is that there is a third party site linking to these URLs. In that case, there is also nothing for you to fix.
Once you have identified the source of the URLs and fixed it if possible, you can redirect all the URLs. You can use the RedirectMatch directive in .htaccess to do so for all of them with one statement:
RedirectMatch "/(.*.html)print$" "http://example.com/"
Redirecting to remove URL parameters is a little bit different. To remove a query string of m=1you can use these rewrite rules:
RewriteEngine On
RewriteCond %{QUERY_STRING} ^m=1$
RewriteRule (.*) ? [R=permanent]
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.