How to Prevent Netlify Subdomain from Being Indexed ?

I'm hosting a site on Netlify and using a custom domain (e.g., mydomain.com). I want to make sure the custom domain gets indexed by search engines, but I need to prevent the Netlify subdomain (myproject.netlify.app) from being indexed. Does anyone know how to handle this properly, especially if I'll be moving to Astro later? Are there any built-in Netlify features or other suggestions for this scenario?
3 Replies
b1mind
b1mind2d ago
Are you using Netlify DNS/Nameservers? FAIK if you are using them to serv it shouldn't effect it.
b1mind
b1mind2d ago
Redirects and rewrites
Manage traffic to your site by defining redirect or rewrite rules in a _redirects file or a netlify.toml file.
b1mind
b1mind2d ago
you can also setup a _redirect though
Want results from more Discord servers?
Add your server