I understand that Google automatically adds the sitelinks to the list, as the developers’ page states. I cannot remove the sitelinks that appear in Google search results, as shown in the picture.
I’ve tried several ways to remove them, but I haven’t been successful:
I added the tag to each HTML file, as suggested in the Google developers’ guide about noindex.
I modified the robots.txt file to disallow the files that I don’t want to appear. I also tried changing the .htaccess file by adding:
# Add X-Robots-Tag header to specific pages
<Files "___cumple.html">
Header set X-Robots-Tag "noindex"
</Files>
<Files "___locales.html">
Header set X-Robots-Tag "noindex"
</Files>
- Finally, I tried changing the file names, for example, from “locales.html” to “__locales.html”, to see if Google would stop indexing these files.
I didn’t build this website; a friend gave it to me. I have access to the server. Initially, I needed to remove the redirections to the pages that appear in the picture, so I changed the file names to generate 404 errors. However, I still can’t remove them from the sitelinks. Can anyone help?