diff --git a/src/app/robots.js b/src/app/robots.js new file mode 100644 index 0000000..89882b1 --- /dev/null +++ b/src/app/robots.js @@ -0,0 +1,17 @@ +import { WEBSITE_URL } from '@/constants'; + +export default function robots() { + const SITEMAP = 'sitemap.xml'; + + return { + rules: { + userAgent: '*', + allow: '/', + }, + sitemap: [ + `${WEBSITE_URL}/${SITEMAP}`, + `${WEBSITE_URL}/posts/${SITEMAP}`, + `${WEBSITE_URL}/categories/${SITEMAP}`, + ], + }; +}