Duplicate sitemaps

Created on 26 January 2023, almost 2 years ago

Problem/Motivation

Created sitemap 'main' and it shows up on

mysite.com/main/sitemap.xml
mysite.com/sitemap.xml

Is there a way to hide/remove this first link?
mysite.com/main/sitemap.xml

When trying to remove it I remove both, and we need only one sitemap for our website.

Steps to reproduce

I've created a sitemap type 'Main' using Default sitemap generator with all included URL generators.
I've create a sitemap 'Main' that uses this sitemap type.

Proposed resolution

I've tried the hooks from the README file in the module but haven't found an option.

Any help would be appreciated, thanks!

💬 Support request
Status

Fixed

Version

4.1

Component

Code

Created by

🇷🇸Serbia Djaps

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

Comments & Activities

  • Issue created by @Djaps
  • 🇩🇪Germany gbyte Berlin

    Please don't tag support requests as bug reports.

    You have a sitemap called 'main' that is set as default which is why it shows up on /sitemap.xml in addition to /main/sitemap.xml. See description of 'Default sitemap' setting on /admin/config/search/simplesitemap/settings.

    There is no UI option to remove the first route. Maybe try a redirect via .htaccess or the redirect module, or, better yet, alter the route programmatically via route subscriber.

  • 🇷🇸Serbia Djaps

    @gbyte - Sorry, I wasn't aware if this was a feature request or a bug.

    Those options were my next step, I just thought I was missing something.

    Thanks for the help!

  • Status changed to Fixed almost 2 years ago
  • 🇩🇪Germany gbyte Berlin

    Pleasure.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024