Quantcast
Channel: EasyEngine Community Forum - Latest posts
Viewing all articles
Browse latest Browse all 12639

Prevent search engines from indexing a development server, "add_header" Nginx

$
0
0

I've got a server set up for development purposes only. I used ee site create devserver.tk --wpfc, that's an ordinary install + a letsencrypt update.

I'd like to prevent this development server from being indexed by search engines, so in order to do that, where exactly Should I place the following directive?

add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";

I've created a new location / {} block and placed it inside the main server block file on /etc/nginx/sites-available/devserver.tk.conf

Then I restarted nginx with no errors.

But making a curl request to devserver.tk I can't get to see the newly added directive in the headers response.

I'd really appreciate any help regarding this issue.


Viewing all articles
Browse latest Browse all 12639

Trending Articles