Why we need to redirects website access from ip address into domain? That’s one of good question when you read this article. What’s the dangerous if the website is possible to accessed from an ip address? Why need to be redirecting? And why .htaccess?

For understanding domain name and ip address concept, we need to know there is 2 concept when using Domain Name Server application.

  1. Reverse ( IP Address into DNS )
  2. Forwarding ( DNS into IP Address )

With that’s 2 basic concept, an DNS application can work fine. But sometime when web admin’s do some mistake or in another case do the forgotten configuration.

So? How to redirecting ip address from website into domain we want?

With default configuration we don’t need to configure reverse and forward, all of we need is configure in the BIND application. But if the configuration is not applied or not working correctly, there is some trick that we can use to redirecting.

Redirecting Website Access From IP Address Into Domain Using .htaccess

  1. Make sure you have an ip address, public ip for internet network and private ip for an private network. ( Testing ).
  2. Make sure the ip address is possible to accessed.
  3. Try to access the ip address.
  4. If we know the default record of the ip address, we can easily configure the redirector.
  5. Add or change the .htaccess file from the default directory of the website we can call it the / (root) directory.

 Note :

  • For some information that .httaccess is need rewrite access allowed from php configuration
  • We just need to write the RewriteEngineOn 1 time on the first line.
  • For an example the ip address used is, this ip address is conditional. You can change whatever you want, based on your server of course.
  • You can change the domain you want of course instead http://gurisa.com.

After successfully adding the configuration, save and try access your ip address using the browser. When client access the ip address using the browser, client will redirected into domain.

This is some tutorial to decrease hacking activity, increase the SEO friendly, and make client easily to remember the domain name we have. Yes, because it’s the first thing why domain is created.

Reference :

Kamu bisa membaca artikel ini dalam bahasa Indonesia.

Mengarahkan Akses Website Dari IP Address Menuju Domain Menggunakan .htaccess

Easily to remember the website