John Mueller on blocking Googlebot from rendering a pop-up
Google's John Mueller answered a question on Reddit (opens in a new tab) about preventing Googlebot from rendering a website pop-up (in this case an age verification pop-up):
- You can disallow the specific JavaScript file for the pop-up in robots.txt (but don't do this if that JS file does other things too)
- If the pop-up is provided by an external domain, then that domain can block crawlers in its robots.txt and then Googlebot won't fetch the pop-up content
- Of course make sure your website still loads properly once Googlebot is blocked from that specific resource
Helpful to know because it's apparently an authorized exception to the "make everything human visitors experience accessible to Googlebot"

