Crawl-error: Google searches for foo.tld/www.foo.tld

Crawl-error: Google searches for foo.tld/www.foo.tld - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the Crawl-error: Google searches for foo.tld/www.foo.tld error on your web browser. Problem :


Google Webmaster Tools is reporting strange crawl errors. It reports that www.example.com can't be found, yet the domain is valid and is an exact match of our clients domain.



A click on the error shows me a more detailed error, but somehow more abstract - when I click on the second tab - from where it comes:



Crawl error



What is the problem here? Is it because of our .htaccess?



We had to redirect for some several reasons:



RewriteEngine On
RewriteCond %HTTP_HOST !^www.
RewriteRule ^(.*)$ http://www.%HTTP_HOST/$1 [R=301,L]

Solution :

The problem is how you craft your hyperlinks on your page.



For example, if your page is reached at http://www.example.com and you created a link using the following code:



<a href="example.com">Some page</a>


You got a problem. The reason is because "example.com" here counts as a relative URL and clicking on it will cause it to append to your old URL so therefore, you get http://www.example.com/example.com.



An easy way out (if you're willing to make the code size bigger) is to make the URL absolute. The following is a code for a link to an absolute URL:



<a href="http://www.example.com">Some page</a>


When you access absolute URLs, the entire URL is replaced in the address bar of your browser with the new URL.



Start with absolute URLs for all links to make sure they all work first. Then later, do some research on relative URLs and convert the links over if you want to save bandwidth.


We hope that this article has helped you resolve the google-search-console, redirects, web-crawlers error in your web browsers. Enjoy browsing the internet uninterrupted!

Comments

Popular posts from this blog

How to redirect to any domain [duplicate]

"302 found" for index page bad for SEO?

Create redirect from url like www.example.us/?p=100&option=