/** @type {import('next-sitemap').IConfig} */
module.exports = {
	siteUrl: "https://www.example.com",     // Your website URL
	generateRobotsTxt: true,                // Generate robots.txt file
	exclude: ["/dashboard*"],               // Exclude paths from the sitemap
	...
};

You can configure the sitemap generation process using the next-sitemap plugin. The siteUrl property specifies the base URL of your website. The generateRobotsTxt property determines whether to generate a robots.txt file. The exclude property allows you to exclude specific paths from the sitemap.

The sitemap is generated automatically during the build process.

For more information on configuring the sitemap, refer to the next-sitemap documentation.

Was this page helpful?