next-sitemap icon indicating copy to clipboard operation
next-sitemap copied to clipboard

I want the host directive to be an optional entry.

Open hashibadaiki opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe.

error-image

I am getting a "syntax error" at the host directive. (This is the result of a crawler run by a search engine called bing.)

Describe the solution you'd like

  robotsTxtOptions: {
    additionalSitemaps: [
     "example.com" + "foo",
    ],
    policies: [
      {
        userAgent: '*',
        allow: '/',
      },
    ],
  hideHost: true, // ← Please add this option!
  },

Describe alternatives you've considered

And now google doesn't seem to recognize the Host directive either!

https://developers.google.com/search/docs/crawling-indexing/robots/robots_txt?hl=en#syntax https://stackoverflow.com/questions/22011604/can-i-use-the-host-directive-in-robots-txt

Thanks for reading.

Additional context

hashibadaiki avatar Dec 18 '23 06:12 hashibadaiki

Temporary workaround found here: https://github.com/iamvishnusankar/next-sitemap/issues/381#issuecomment-1268146841

lukastransom avatar Jan 10 '24 00:01 lukastransom

thx!!!!!

hashibadaiki avatar Jan 10 '24 01:01 hashibadaiki

Closing this issue due to inactivity.

github-actions[bot] avatar Mar 10 '24 04:03 github-actions[bot]