Hi everyone
I’m looking for a way to prevent Google from showing my app in search results.
Haven’t seen anything in the options for this, or any place I can apply the methods for doing this which I would apply to a general URL:
apply ‘meta name=“robots” content="noindex’ to the head section of the html
add a line to the robots.txt file preventing crawling of the URL
Thanks,
Richard
Completely untested and coming from someone with no HTML background but your first approach might work. Check out the docs
https://anvil.works/docs/client/javascript#using-native-javascript-libraries
Thank you for the tip @rickhurlbatt ! I’ll try it out
It worked - thanks for the tip
2 Likes
richard.lewis:
apply ‘meta name=“robots” content="noindex’ to the head section of the html
add a line to the robots.txt file preventing crawling of the URL
did you add a robots.txt file to the app assets?
@joinlook I didn’t use the robots file, as the noindex was sufficient to prevent the app appearing in Google’s results.
I know this is silly…and also 18 months from the future…
but where on earth do I put this to make it work?
<meta name="robots" content="noindex,nofollow">
<meta name="security" content="noindex,nofollow">
<meta name="humans" content="noindex,nofollow">
I’ve put it in native libraries (as is) but doesn’t seem to do anything.
Apologies in advance.
That says to apply those to the head section of the HTML. Look in your Assets section, you’ll see the template for the HTML file there. I’m assuming that’s where they should go.
Obliged J, I will try shuffling them around until something takes unless told otherwise…