I have submitted my sitemap at 2 months ago on google it still shows error can’t fetch.
when I validate error shows Incorrect http header content-type: “text/html” (expected: “application/xml”).
how to fix it.
This is probbaly due to the security system, which adds ?i=1 to the url, which google probably doesn’t like
to remove this surfix use cloudflare or add this in .htaccess
RewriteCond %{QUERY_STRING} ^(.)i=[^&]+(.)$ [NC]
RewriteRule ^(.*)$ /$1?%1%2 [R=301,L]
The point isn’t about to remove ?i=n nor security system can be
disabled with this htaccess rule.
AFAIK Google can reach websites, it’s already whitelisted and can bypass Security system.
@weballigator what’s the url of your xml file?
I add but still show https://weballigator.ml?i=1
this is my xml URL http://weballigator.ml/sitemap_index.xml
i’m using yoast plugin
I think what your problem is, the site map you’ve submitted is an index, or like a navigation to multiple sitemaps. That is what Google doesn’t like. Try submitting each sitemap listed on that page to Google and see if that works.
i know i just said how to remove that
Oh it’s understandable. It’s because Google tries to fetch from sitemap.xml and since it doesn’t exist, it’ll be redirected to 404 page. Try to rename to sitemap.xml to see if it works.
thanks guys this technique works.
4 posts were split to a new topic: Problem with sitemap
Locking this topic because someone prevented it from getting locked at its time.