Google Indexed Netlify Subdomain instead of my Custom Domain

Hey Guys :slight_smile: i need help with my small website, Google Search results show the subdomain instead of my custom domain. This was working for the past 3 weeks, then i tried yesterday to check again since google notified me that it reached 900+ clicks but it wasn’t indexed by Google i can’t find it anymore in the search results, so i resubmitted the url to be indexed again in ‘Google Search Console’ but when it was indexed what’s showing in search results is ‘Netlify’ and not the title of my website, you can also see that the site is referring to the subdomain and not my custom domain

Screenshot 2024-05-24 at 11.52.08 PM

before what was shown above is:

Now here’s what i did so far:

i added a _redirect inside the public/ of my react app* 301!
/* /index.html 200

also added a canonical tag in public/index.html

<link rel="canonical" href="" />

After I added those, I submitted it again to index my site, but it still displays ‘Netlify’ :frowning:

oh nevermind it seems working now :smile: changed the canonical tag to

<link rel="canonical" href="" />

since i change my primary domain in Netlify to www

Another thing you could do @dids-reyes is create a header rule such as*
  X-Robots-Tag: noindex
1 Like

I’m back again after 2 weeks google indexed my website again now it has :splat included in the url so users think the website is not working when searching through google :frowning:

This is the link google indexed again