Deploying to GitHub, then Custom Domain; what baseurl?

I am able to host my Hugo website on GitHub following these instructions to deploy to the /docs folder. The site now appears at

However, I would now like to host this site on a custom domain,

I’m arranging for the CNAME to forward to, but I’m a bit confused about what to use as my baseurl in my config.toml file.

Should this be or It seems like whichever one I choose, the other URL will not have appropriate hyperlinks to css files (as arranged by my Hugo theme, which seems to use the baseurl to determine paths). Is there a way for it to render properly in both?


If you have set up your Github Pages to host on your custom domain then set the baseurl to the custom domain.

Unrelated but I’d just go with Netlify… they provide https on custom domains too while Github Pages doesn’t… and also is really painfree to set up compared to Travis CI + git branches + Github Pages.