Skip to content

a better robots.txt #16560

@craigbox

Description

@craigbox

Once #16559 is finished, we should know on any given Netlify deploy, if we are "production" or not, and what our baseURL is.

#16558 adds a static robots.txt file. We should be able to update it to something more like

User-agent: *
{{- if eq hugo.Environment "production" }}
Sitemap: {{ "sitemap.xml" | absURL }}
{{- else }}
Disallow: /
{{- end }}

at this point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions