How can I hide my website so that only the computers I choose can access it?

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

Submit an answer

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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