How do I add a CNAME to my site?
For some hosting providers (such as GitHub pages) you will need to place a
CNAME file in the root of your site.
You’ll need to ensure that the CNAME file is treated as a static file, so that it is copied to the root of your site during the build.
CNAMEfile in your source directory, not your build directory. Otherwise it will be deleted during the next build
- Jekyll: any file without front matter is treated as a static file, so place your
CNAMEfile in the root of your source folder
- Hugo: any file inside of the
static/directory in your source folder is treated as a static file.
- VuePress: files inside of
.vuepress/publicare treated as static files.
Caught a mistake or want to contribute to the docs? Edit this page on Github!