Hello, I am new to the digital ocean and actually also to the use of Linux servers, currently I need to prevent my site from being accessible by a search engine, I wish I could choose which devices can access it, since I only need them to access my site about 10 users who are in different geographical areas
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @darkdevil333666,
You can achieve any of that with a few simple rules. Firstly, in order to prevent search engines to actually list it you can make a lot of changes. The first I can think of is adding a meta tag like so
<meta name="robots" content="noindex">
A better approach for your requirements is actually denying the website for the public. If you know the people that are going to be using it, you’ll just need to get their IP addresses and allow only them.
Another approach might be setting up a password protected website. That way you can provide the people that need access with the password and only they will be able to login. To do that, you’ll need to use Apache and add the following to your .htaccess
AuthType Basic
AuthName "/path/to/protected/folder"
AuthUserFile //path/to/protected/folder/.htpasswd
require valid-user
You’ll need to change the path with your actual one. You’ll need to add the user you’ll want to access the website with in the /path/to/protected/folder/.htpasswd file.
That’s it, every way of the mentioned should actually work for you. Now, it depends which one would you feel will suite you best.
Regards, KDSys
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.