Where to put enableRobotsTXT

I need an explanation.
in the config.toml file,
enableRobotsTXT must be placed inside, outside, before or after the [params] section?

Put it before.

just below this?

baseurl = "https://example.com/"
languageCode = "en-us"
languageLang = "en"
title = "title example"
theme = "themename"

Follow the advice at Requesting Help and share your repo and config. Then we can just look at it and test it. :slight_smile:

https://github.com/nicovoni/victor-hugo

Robots. Plural. Your site is working correctly.

1 Like

it is true, what a careless I am!
Ps. something I did not understand. in which folder the robots.txt and sitemap.xml files were created?

I believe robots.txt is at the root of the site directory, and the sitemap.xml too, but it might have other places it can live.

But to answer your question you should:

  1. Read up on robots.txt
  2. Read up on sitemap.xml
  3. Build a Hugo site and search your local filesystem to understand how they are rendered

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.