Duda allows you to upload several different file types to the root of your website. This allows you to have selected files that are served from the root of your domain, in order to use them as additional data to assist in your website.
The most common use cases for this are replacing the default robots.txt and sitemap.xml files that Duda automatically generates (for more information on the default sitemap, see How do I Access the Sitemap?). If for example, you want to override these files, you can upload your own. Or, maybe you want to add a file which Duda does not generate, like ads.txt.
Replace the default sitemap, robots.txt file, and/or add other files
To replace the default sitemap, robots.txt file, and/or add other files from SEO settings:
In the side panel, click Settings, then click SEO.
In the Custom sitemap, robots.txt, and other files section, click go here.
You will be directed to the URL Redirect screen with the File option already selected.
In the Source URL field, enter in the file path you would like the file to have. For example, if you enter in ads.txt, the path for it on the live site will be www.mydomain.com/ads.txt.
Click Upload file.
The Redirect type is 2xx OK. It will already be selected and there are no other options.
Click Save.
- Publish or republish the site to update or add the file to the live site.
To replace the default sitemap, robots.txt file, and/or add other files from URL Redirects:
- In the side panel, click Settings, then click URL Redirect.
- Click Add a New Redirect.
- Type in the file path you would like the file to have. For example, if you enter in ads.txt, the path for it on the live site will be www.sitename.com/ads.txt.
- Select the File option.
Click Upload file.
The Redirect type is 2xx OK. It will already be selected and there are no other options.
Click Save.
- Publish or republish the site to update or add the file to the live site.
Do you have anyone who can help me create or edit custom files?
While we do not have developers who can help with the custom files, we do have a network of experts who would be happy to help you. You can contact them on our Experts page.
Revert back to using the Duda generated files
To revert back to using the Duda generated sitemap and/or robots.txt files:
In the side panel, click Seo & Settings, then click URL Redirect.
Click Delete for the file you would like to remove.
Publish or republish the site to make change live.