Hi Guys! I have a website but we don't host in GoDaddy or any hosting website, because we use SQL database. And we have a large database that we are using , the website is for productions.
We store a lot of data. We use the IP address because we port forward it so that we can use it anywhere.
Now, we are worried because we are exposing our IP address outside, and it might be the reason for hackers or any attacks to come to us.
Can you help me or give me an Idea how can I change our web address without using the hosting sites?
Can I do it by programming? or do I need to change something in IIS? or how to it using FTP?

Thank You!

Dani AI

Generated

A short, practical summary and next steps based on 's posts and 's HOSTS-file fix.

The HOSTS file only maps a hostname to an IP address — it does not accept URL paths like "/login.asp" — and it must be edited on every client that needs the name. That makes HOSTS a valid short-term workaround (as found) but not a scalable or public solution.

Ways to get a readable name without moving to a third-party "shared" host:

  • Register any domain and create an A record that points to your public IP. The registrar’s DNS tools let you do that; the browser URL becomes the domain (for example: ).
  • If your public IP changes, use a dynamic-DNS provider (many offer free subdomains). Either use their subdomain directly or create a CNAME from your purchased domain to the dynamic-DNS name.
  • For an internal-only rollout, run a local DNS server (Windows DNS, Pi-hole, etc.) and publish an A record there so internal clients resolve the friendly name without editing HOSTS.

IIS and network setup notes that were missing or unclear in the thread:

  • Bindings accept only the hostname (not a path). Put the hostname in the site binding and bind to the correct IP or "All Unassigned" on port 80/443.
  • Make sure the server has a static LAN IP, the router forwards ports 80/443 to that LAN IP, and the Windows firewall allows inbound HTTP/HTTPS.
  • If internal users cannot reach the public name because of NAT hairpinning, use split-horizon DNS (internal DNS returns internal IP) or keep internal HOSTS entries as a temporary fix.

Security and operational tips:

  • Never expose database ports to the internet. Prefer VPN access for internal apps or put the app behind a reverse proxy/WAF.
  • Use TLS for login pages (free certificates are available), keep the server patched, and restrict access by IP where possible.

Quick checklist:

  • static LAN IP on server
  • router port-forwarding correct
  • IIS binding uses hostname only
  • internal DNS or HOSTS for LAN clients
  • TLS + firewall + DB ports closed

Recommended Answers

All 15 Replies

Let's try easy.

Add your IP to your HOSTS file. That way it will show on screen as some name but resolve to the IP. If folk show screen shots or look over your shoulder then the IP doesn't show.

, I want to try the Hosts files but the I think I will have problem , our web address is looks like this 192.0.0.0/mycrm/login.asp
192.0.0.0 is the IP that assign in the server
mycrm is the main folder of the website
I just set up the web address in IIS

I tried to ping it first then nothing is showing up. Then I am thinking it will not work on HOSTS file, am i right? not sure
It says on the error 192.0.0.0 is not recognized as an internal or external command, operable program or bacth file

The reason that I am still doing HOSTS file is because we are still using the system. I will update you later. But It is just an observation, because I do the hosts file before on our website that is in google now or I can ping

The problem with IP addresses that end in zero (0) is well discussed. It's a shame you used that one as it clouds the discussion. Google about it and retest with your non-zero address. Be sure to reboot after the HOSTS change to be sure that it's in effect.

, it just a sample, It is not the actual Ip Address , we are using different one. I just put it as sample, lol,
Sorry about that

@j, I take what folk write as the truth. So if I'm getting something untrue, well, you know, GIGO. However the HOSTS entry works fine here but on some Windows you have to reboot.

, Hi again, I already did what you told me, I put my the server's IP Address and beside is the new name for my website. I also put the 127.0.0.1 beside is the new name of my website also

Example of what I did (not original Ip Address)
127.0.0.1 www.mycrm.com/login.asp
192.0.0.0 www.mycrm.com/login.asp

It works on the server's computer. Now my only problem is , I cannot access it through other computers, or other internet connection.

So I tried to add Bindings in IIS, I put 80 as port and put the new name of my website to Host Name.

It didn't work. We use port forward to be able to access the system outside.
I don't know what to do next, but I am still working on it, since it is work on server itself, I just need to find a way to make it visible to other computer and connection also.

You need to buy a domain name if you don't have one already. Once you have one, you need to modify the DNS settings so that it points at your web server. Whoever you buy the domain from will have instructions on how to do this.

If you don't want to buy a domain you can host and configure a server internally on your network, but if other people on the internet want to use your site that won't affect them.

127.0.0.1 www.mycrm.com/login.asp

That's not how I use HOSTS files. I would have not added the /login.asp.
Did you check for tutorials on how to use the hosts file?

Since you appear to be fibbing about the IP address I take it that you put the real IP in the HOSTS?


I put my real IP Address in the HOSTS file.
I put the login.asp because It wont open the specific Website, It will go to IIS website/ IIS7. It wont direct on the Log in page.
After I edited the Hosts File, It can be open in my computer but the problem is the Website cannot be open in other computer.


We have a huge database and buying a domain will costs a lot
and I have already configured it internatlly, but I am using Ip address, I just sent the Ip address / web address of the site , so that we can access it to the internet.

Since I can't see what you did with the hosts file, I have to leave you here.

"127.0.0.1 www.mycrm.com/login.asp" is not a valid entry.

I'd go with

"127.0.0.1 www.mycrm.com"

Then the URL would be http://www.mycrm.com/login.asp

yeah, you're right, It works www.mycrm.com and I just add the login.asp. Thank you for correcting me. :)

The only problem now is I can't access it on the other computers? I used the same web address, I also check the one that I set up properly the IIS. I put the web address www.mycrm.com on the Host name in IIS but still not working. I am searching online also if it is possible to use HOSTS file to access the website in other computers.

The use of the HOSTS file is when you don't have a DNS under your control. If the other computers need access, you edit their HOSTS file as well. This is a workaround to where folk host their own interweb but don't have a DNS. Works well enough but a new networker will complain about having to edit all those HOSTS files. That's why you deploy a DNS for your network.

, you are truly a genius, I edited the hosts file of my other computers and it works. I can access it anywhere now. But of course I need to edit the hosts files before before I can have access outside. But it is such a great help. Thank You so much.

I only know that , I need to buy a domain name or make our website hosts by GoDaddy and other hosting site so that I can get rid of the IP address.

I would like to ask , you mean by "deploy a DNS for your network" . I need to set up my DNS in my network so others can have access on my website without editing the Hosts File?

The HOSTS file is your poor man's DNS. If you had deployed a DNS in your network, then you could have used that. I'm no genius but I have my moments.

thank you so much, now I get it. I will search more how to do the DNS because I am familiar with it. I just know some. Thank you for giving me an idea for the Hosts file.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.