Published on

Exclude pages from netlifys sitemap plugin


I included the netlify sitemap plugin in my nuxt.js site. However I kept getting excluded pages still showing up! Hopefully this saves you some time if it’s happening to you as well.

You need to remember nuxt is generating static HTML files, so even though the route is /contact/success the page to exclude (since it’s looking at files) is /contact/success.html

Here’s an example of a working nuxt.js netlify.toml with working excludes.

Note the netlifycms admin route is NOT an html file, do not add it to there.

  publish = "dist"
  command = "yarn generate"
  functions = "app/functions"

  package = "@netlify/plugin-sitemap"

    exclude = [

Boost your online presence.

Let us create the perfect digital experience for your company.

Contact us now