0

I have a sitemap.xml file with entries of the form:

<url>
  <loc>https://www.example.com/?page=x&amp;item=5</loc>
  <changefreq>weekly</changefreq>
</url>

Lately my admin panel reports a lot of 404 errors from google crawlbot IPs, trying to access:

/?page=x&amp;item=5

which is of course an invalid address.

Why doesn't google parse &amp; into &?

  • 1
    Are you sure they're getting that URL from the sitemap and not from somewhere else? A poorly manifested URL somewhere on the site, for instance? Because you're doing the right thing. – GeoffAtkins May 21 at 7:42
  • Can't be sure. I checked my links inside the site, they all contain &amp; in the href attributes, as required. They also work fine on the browser. – Itay May 21 at 8:32
  • Are there any issues with the sitemap listed in Search Console? – GeoffAtkins May 21 at 8:33
  • Doesn't seem like it. See the attached screenshot. – Itay May 21 at 8:36
2

If you are sure that all your internal links and sitemaps are correct, and that you have no red flag about your sitemaps in the Google Search Console, then there is probably, as clued by GeoffAtkins, at least one badly formatted backlink from a third-party website, coded like this:

<a href="http://www.example.com/?page=x&amp;amp;item=5">badly coded backlink</a>

Demo: badly coded link

You could search in your HTTP-server error logs to try to find the faulty referering page. Once identified, you can suggest a correction to the webmaster. Without success, you can set a redirection from the bad URL to the good one.

# /.htaccess (Apache)

Redirect 301 /?page=x&amp;item=5 /?page=x&item=5
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.