How to Redirect Default Netlify Subdomain to Custom Domain

When you add custom domain to your netlify app, the [your] not automatically redirect to your custom domain.

To redirect default netlify subdomain to your custom domain, add new file _redirects and save to the root of your website, then fill the _redirects file with the code below.

# Redirect default Netlify subdomain to primary domain

https://[your]* https://[your-domain].com/:splat 301!

# Example:* 301!

In Hugo, save _redirects file to static folder.

#domain   #netlify   #hugo  

comments powered by Disqus