Page 1 of 1

IP Address in the URL - is that bad?

Posted: Tue Oct 27, 2015 11:28 am
by simonmlewis
We have been told that our site is allowed to have the IP address used in the URL , in place of the domain name, and that this is bad.

ie.
www.sitedomain.com/contact-us
Is the same as:
88.88.88.88/contact-us.

Is this a bad thing?
If it is, how does one resolve it?

Re: IP Address in the URL - is that bad?

Posted: Tue Oct 27, 2015 2:48 pm
by Celauran
Should be fairly trivial to redirect all such requests.

Code: Select all

RewriteCond %{HTTP_HOST} ^88\.88\.88\.88$
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [R=301,L]