• Hello,

    I want my website to accessible through its IP Address, how do I achieve that?

    What happens is when I type-in the IP address in the URL it redirects to the website name, that’s something I dont want to happen. I just want some of our users to access the website through an IP address without it redirecting to the actual site name.

    Does someone have a solution or a work around for this?

    Anyone? Any web gurus out there, please?

    Thank you in advance.

    Look forward.

    Best, Krypto.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hello @kryptojdubai,
    You can run your site by the IP address, you can get it from your host provider.
    But make sure the host should not be shared one. It must be dedicated only to your site. Please confirm this first from your host provider and then you can run your site using the IP that they provide you.

    Thanks!

    Thread Starter kryptojdubai

    (@kryptojdubai)

    Hi Shobhit,

    Thanks for your quick reply.

    I have an IP address but as soon as I type-in that in the URL it redirects to the website name.
    And this IP address is dedicated only to my site.

    What exactly do I need to do?

    Thanks.

    Hi again,
    You need to update the ‘siteurl’ and ‘home’ in ‘options’ table in phpMyAdmin to the IP Address that you’re trying to run, but please make sure, there is no redirection code written in ‘.htaccess’ file (placed in root folder).
    Also note, please re-update the values of ‘siteurl’ and ‘home’ in ‘options’ table if this doen’t work.
    Also first make the backup of all the things you are updating, including the database.

    Thanks!

    • This reply was modified 8 years, 4 months ago by Adarsh Verma.
    Thread Starter kryptojdubai

    (@kryptojdubai)

    Thank you for the reply again.

    My site url and home is same.

    e.g, if my site is https://www.example.com, my homepage is https://www.example.com as well. I dont have https://www.example.com/home as homepage.

    Is there a detailed guide/resource to look into to carry out the method that you suggested?

    Thanks.

    Hi ,
    Yeah, you can look into this: Change Site URL

    All you need to do is just replace https://www.example.com by <IP ADDRESS>.

    Thread Starter kryptojdubai

    (@kryptojdubai)

    OK thanks a lot. Will try that.

    Just a clarification. Doing this, people will still be able to access the site using the web address, right? I actually want both options to work.

    Thread Starter kryptojdubai

    (@kryptojdubai)

    Hi Shobhit,

    I replaced the website address with IP address in siteurl and home. But it distorted my website.

    When I keep the option_value to website address, the website works normal again. But putting the values to IP address distorts the website.

    Thread Starter kryptojdubai

    (@kryptojdubai)

    I observed that there is an http to https auto-redirection on. I guess this could be the reason.

    What is the work around keeping the redirection on?

    Thank you for the help so far.

    Hi krypto,
    Given that the DNS system is designed to do the opposite of what you are trying to do (resolve IP addresses to hostnames) I suspect you are going to have a uphill battle in trying to achieve your goal. Especially if you want your site to be accessible both ways – only via IP and by hostname.

    The solution may lie in using .htaccess to direct apache to handle IP requests differently to requests using the domain name, but the actual mod_rerwrite code to do that is beyond me. I suggest you ask your question in a webmasters forum such as stackexchange.com

    Thread Starter kryptojdubai

    (@kryptojdubai)

    Thank you Kevin, for your detailed reply.

    Will try finding solution other forums like the one you mentioned.

    Thanks again.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to Access Website through IP Adress?’ is closed to new replies.