How to Redirect Website IP Address to 404 Error Not Found?

Hi,

How to Redirect Website IP Address to 404 Error Not Found ???

I have installed wordpress on my website

If i enter my IP in browser it’s redirecting to My Website

I don’t want someone access my website by entering the IP

I want the IP to redirected to 404 Error Page Not Found

I tried inserting

ServerName $WEBSERVER_IP_ADDRESS UseCanonicalName Off Redirect 403 /

in /etc/apache2/sites-available

But Didn’t work

Please Help me…

I’ll go ahead and ask: WHY?

Seriously. If you’re that paranoid about anybody knowing your IP, sign up for a free Cloudflare account, let it do all your DNS and nobody will ever see your real IP.

It still will not prevent you from being DDoS’d though. But at least it has tools to mitigate it.

Just go ahead and create a new virtual server with domain name 00

that should be sufficient.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.