Can not access sitemap.xml url throwing 404 error

Created on 5 September 2023, over 1 year ago
Updated 13 August 2024, 5 months ago

Problem/Motivation

I have created two domain records in domain and tried to create domain variants using domain access sitemap xml module. but when i am trying to access sitemap.xml it's throwing 404 error. when i uninstall and try to access sitemap.xml its working.

Steps to reproduce

1.create domain records.
2. Genearate domain variants using domain access module and provide node source/access
3. try to access sitemap.xml with created domain records.

๐Ÿ› Bug report
Status

Needs work

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia lvishal

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @lvishal
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia lvishal

    I have added quick workaround domain access simple xml sitemap to make it work for now but it's not great.

  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands borisr

    I ran into a similar problem. The attached patch fixed the issue in my project.

  • Status changed to Needs work 5 months ago
  • ๐Ÿ‡ง๐Ÿ‡ชBelgium tim-diels Belgium ๐Ÿ‡ง๐Ÿ‡ช

    This issue needs more precise steps to reproduce.
    What are the urls you're getting and expecting and where does it go wrong?

  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands borisr

    The issue occurs when trying to access a domain specific sitemap (like domain1.example.com/sitemap.xml, domain1.example.com/sitemap.xml). The issue (in my case) occurs when accessing the sitemaps directly in combination with Redirect module. The expected outcome of accessing the sitemap on a Domain level is that the Domain variant will be returned (in other words, the Domain specific sitemap variant will be returned at domain1.example.com/sitemap.xml etc.).

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium tim-diels Belgium ๐Ÿ‡ง๐Ÿ‡ช

    Still donโ€™t get it sorry.
    To me everything is working correctly if going manually to a sitemap on a domain.

    Is it going wrong when you try to click a link somewhere? Because accessing the sitemap from domain1 on domain2 and visa versa wonโ€™t workโ€ฆ

  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands borisr

    @tim-diels, thank you for trying to understand the issue. Sorry for not being able to explain the issue more clearly.

    The issue occurs when on a domain (lets say domain1.example.com and trying to access the current domain sitemap at domain1.example.com/sitemap.xml). The sitemaps at /domain1_example_com/sitemap.xml etc. are accessible and containing the expected links.
    But behaviour I'am expecting is that the sitemap links applicable for the current domain will be returned at /sitemap.xml.

    Does this explanation make more sense?

    @lvishal can you add any further information regarding the issue?

    PS The patch in #5 seems to resolve the issue (in my case) but some further testing will be appreciated.

  • ๐Ÿ‡บ๐Ÿ‡ฆUkraine Anna D

    Faced with many issues, one of them: domain-A/sitemap.xml shows 404 because there is no indexed content.

    Sharing steps that works for me.

    1. Install module.
    2. Generate domain sitemap variant: /admin/config/domain/domain_simple_sitemap/config
    3. Create new sitemap with your Domain type: /admin/config/search/simplesitemap/variants/add
    4. Allow entities to be indexed in your new Domain Sitemap: /admin/config/search/simplesitemap/entities
    5. Go to /admin/config/search/simplesitemap/types. Remove Entity URL generator.
    6. Regenerate sitemap.

Production build 0.71.5 2024