By therohitrog
Hi, developers
I have recently moved my site from shared hosting to the Digital ocean. And believe or not it was a tough step for me as I don’t have deep knowledge about the server configuration.
After two months, everything is going well so far, but recently, I have started to face a security issue.
Someone has pointed their domain to my IP. I.e domain.com is also accessible from freedomain.com. I have got to know about the cause and it pretty much hurting my page ranking. My issue is something like this
Can anybody suggest how to deal with this?
PS: I can’t try this How to Rewrite URLs with mod_rewrite for Apache on Ubuntu 18.04
My server configuration: Ubuntu 18.04 Apache Wordpress
Thanks. Rohit
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!
Hello,
What I could suggest here is:
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04
<VirtualHost *:80>
<Location />
Order deny,allow
Deny from all
</Location>
...
</VirtualHost>
That way if a domain name does not have a Virtual Host on your server, it would be routed to the default Virtual Host which would result in a 403 Forbidden error.
Hope that this helps! Let me know if you have any questions. Regards, Bobby
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.