Mobile app version of vmapp.org
Login or Join
Courtney195

: Crawl-error: Google searches for foo.tld/www.foo.tld 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

@Courtney195

Posted in: #GoogleSearchConsole #Redirects #WebCrawlers

Google Webmaster Tools is reporting strange crawl errors. It reports that 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:



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 ^(.*)$ www.%{HTTP_HOST}/ [R=301,L]

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Courtney195

1 Comments

Sorted by latest first Latest Oldest Best

 

@Harper822

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

For example, if your page is reached at 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 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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme