Uploading a Robots.txt File in B2C Commerce

If you choose to create a robots.txt file in an external file, you must upload the file to the correct location on your B2C Commerce server.

Upload and manage this file in the cartridge/static/default directory in your custom storefront cartridge using your preferred development tool (for example, the B2C CLI or WebDAV).

You can also manually update the robots.txt file in production after a staging process if the file was accidentally overwritten.

There can only be one robots.txt file per cartridge. Don't put robots.txt files in user directories, because crawlers don't look there.

Note
Note The robots.txt file can only be replicated from instance to instance via code replication. This is because the cartridge/static/default is cartridge-specific not site-specific.