Problem with Sitemap

#61227
  • Resolved Fernando Brenes
    Rank Math free

    I have a problem on Google Search console reporting the sitemap of my site like this:

    https://www.himaxcr.com/sitemap_index.xml == > Couldn’t fetch
    Click on click on it, it shows: Sitemap could not be read

    I read all previous cases and I’m not able to determine the root cause.

    Please test the site map here: https://www.xml-sitemaps.com/validate-xml-sitemap.html

    1) I installed Health Check & Troubleshooting plugin, and just enable Rank Math.
    – Still the same error happened.

    2) I’m using nginx and redis, so I added the string

    # START Nginx Rewrites for Rank Math Sitemaps
    rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last;
    rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
    # END Nginx Rewrites for Rank Math Sitemaps

    Just in case…, same issue is reported

    3) I’m not using any other caching plugin, just redis at the server level, so I disable redis completely and still the same error happened, even though I flush all the cache with: redis-cli flushall

    4) Just in case I doubled check what I’m excluding from redis and the sitemap is excluded:

    # Don’t cache uris containing the following segments
    if ($request_uri ~* “\?add-to-cart=|/cart/|/my-account/|/checkout/|/shop/checkout/|/wp-json/|/store/checkout/|/customer-dashboard/|/addons/|/wp-admin/|/xmlrpc.php|wp-.*.php|/feed/|index.php|sitemap(_index)?.xml”) {
    set $skip_cache 1;
    }

    From a different server I can access the sitemap just fine and what’s really interesting is that it comes with the correct content type text/xml

    [20:10][root@fbvstore001 conf.d]# curl -I https://www.himaxcr.com/sitemap_index.xml
    HTTP/1.1 200 OK
    Date: Fri, 12 Jun 2020 20:21:02 GMT
    Content-Type: text/xml; charset=UTF-8
    Connection: keep-alive
    Set-Cookie: __cfduid=d54e3b1f6c7584c00bc079ae7c4f6becb1591993262; expires=Sun, 12-Jul-20 20:21:02 GMT; path=/; domain=.himaxcr.com; HttpOnly; SameSite=Lax; Secure
    Vary: Accept-Encoding
    X-Robots-Tag: noindex
    Pragma: public
    Cache-Control: maxage=31536000
    Expires: Sat, 12 Jun 2021 20:21:02 GMT
    X-Powered-By: centminmod
    X-Cache: BYPASS
    X-Cache-2: BYPASS
    X-Frame-Options: SAMEORIGIN
    X-Xss-Protection: 1; mode=block
    X-Content-Type-Options: nosniff
    CF-Cache-Status: DYNAMIC
    cf-request-id: 034bca79840000ef1e15940200000001
    Expect-CT: max-age=604800, report-uri=”https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”
    Server: cloudflare
    CF-RAY: 5a2646a26a9aef1e-MIA
    alt-svc: h3-27=”:443″; ma=86400

    I’m out of ideas, Google Search console is not able to use this sitemap.
    Thank you,
    Best Regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • Todd
    Rank Math free

    Hi,

    You have marked the query as resolved

    Is this something you still need help with or did you find a solution already?

    Hi Todd,

    Thank you, I was able to fix the issue. I had a wrong entry in my nginx file blocking robots.txt

    Thank you,
    Best regards

    Hello,

    We are glad you were able to resolve your issue.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘Problem with Sitemap’ is closed to new replies.