0
votes

I want to block in the htaccess URL file (https://www.example.com/files/example/index.html) for Google robots. Searching through the search engine I found something like:

RewriteEngine on
RewriteCond% {HTTP_USER_AGENT} Googlebot [OR]
RewriteRule ^. * $ "Http \: \ / \ / yordomain \ .com" [R = 301, L]

This file is for the domain, and I want to block a specific URL, how can I save it?

1

1 Answers

0
votes

Why would you want to use it in htaccess?? Try using robots.txt Place the file with the code in the public_html folder.

User-agent: *
Disallow: /path/to/the/page/rate

Else you can make an, .htaccess file and save it in the public_html folder.

Check this post How to block Googlebot from accessing one specific page