• I have already posted this on Yoast Seo forum but it seems that the issue is with Worpress and not Yoast Seo. I have a one-page site but upon clicking the sitemap option in Yoast Seo, it takes me to the home page and this is why Google Search Console would not accept my link saying it is in HTML. I deleted the site and reinstalled WordPress but am still getting the same issue. In the Yoast Seo forum, this is what they have written and I cannot understand what to make of this – they have hinted that this problem is happening due to WordPress and not the Yoast Plugin. Can anyone please help.
    Please note there is no content on my site as of now but you can access it.

    This is what they have written
    _______________________________________________________________________________

    There is an issue related to “forcing trailing slash”:
    
    $ curl -k -i https://furlytics.com/sitemap_index.xml
    HTTP/1.1 301 Moved Permanently
    Date: Thu, 15 Jul 2021 06:22:29 GMT
    Server: Apache
    ...
    X-Redirect-By: WordPress
    ...
    Location: https://furlytics.com/sitemap_index.xml/
    ...
    When I try to access via query string (/?sitemap=1) then the sitemap index works (same for sub sitemaps).

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • The problem is this:

    View post on imgur.com

    Try this:
    https://searchfacts.com/url-trailing-slash/

    and there is more info here:
    https://wordpress.org/support/topic/remove-trailing-slash-from-links/

    Somehow WordPress is adding this probably on some sort of htaccess (or maybe server) redirect:
    https://docs.wp-rocket.me/article/131-redirection-to-enforce-trailing-slash-on-urls

    I think there’s more (or perhaps less :-D,) going on here than just the trailing slash.

    1) It seems the site is using the “Plain” permalink setting. So the “Hello World” post has the URL with the query string /?p=1, instead of the URL with the slug /hello-world/.

    Similarly, the correct Yoast sitemap URL is /?sitemap=1 and not /sitemap_index.xml

    So the supposed Yoast sitemap URL /sitemap_index.xml actually doesn’t exist at all.

    But instead of returning an HTTP status code of 404 and showing the “Not Found” page…

    2) It seems the site is somehow configured to return the homepage content for ALL non-existing URLs (with 301-permanent-redirect to the slash URL which in tumours return 200-found). Just try any random, non-existing URL at your domain eg /random-url-o2syr — you’ll get the same redirection and see the same homepage content.

    This is probably the trailing trash issue @corrinarusso mentioned, though I’ve had sites with and without trailing slash and never encountered such an issue before.

    To fix #1 in order to get the Yoast SEO sitemap URL at /sitemap_index.xml, this should be as simple as going to SETTINGS => PERMALINKS and setting the permalinks to anything other than PLAIN.

    At least that’s my theory, unless something else is at play here 😀

    Thread Starter mjaitly123

    (@mjaitly123)

    Thanks a lot, George. I changed the permalink settings and it worked! Thanks once again.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘SiteMap Issues’ is closed to new replies.