Robots.txt

Hugo robots.txt Generation

Hugo robots.txt Generation

3 min read

Crawlers still look for /robots.txt before they dig through your tree. Hugo can generate that file at build time from a template, so the Sitemap URL always matches your baseURL and you can add allow/disallow rules without maintaining a hand-copied static file.