When it comes to finding a solution, Necessity is the driving factor. As you all know, we recently launched our website. Little did we know, when searching for Stackrole found two website being indexed on search engine. One being the custom domain and the other is Netlify subdomain.\ \ Best way fix this is to add 301 redirect for Netlify subdomain. You can add the following code to your netlify.toml in your websites root directory.

[[redirects]]
  from = "https://example.netlify.app"
  to = "https://example.com/"
  status = 301
  force = true

Replace the example with your site name.

Join the Newsletter

Subscribe to get latest updates on Jamstack, How-to guides and best Jamstack templates in your inbox

We respect your privacy. you can Unsubscribe at any time.

© 2022 Stackrole • Proudly built on Jamstack with Gatsby and Strapi • Hosting by Netlify

Stackrole — Jamstack Marketplace - Curated marketplace for Jamstack templates | Product Hunt