I have a site hosted in IIS 8 of Windows server 2012 machine. I also have the public ip address of the web server. Now, to host the site as an public internet site and access via a domain name, can anyone please help me in how to proceed with.
As of now, I understand that I have to change the binding of the website with the public ip address.
You are correct, you have to change the bindings of your web site, you do that in the IIS Manager GUI on the site level. Click bindings
in on the right hand side and add your IP address with an empty hostname.
Or via the command line:
C:\Windows\System32\inetsrv\appcmd.exe set config -section:system.applicationHost/sites /+"[name='Default Web Site'].bindings.[protocol='http',bindingInformation='127.10.10.10:80:']" /commit:apphost
where Default Web Site
is the name of your site and 127.10.10.10
is your public IP address.
Now assuming your network is set up correctly you can access the site in a browser by using your public IP address.
To use a host name instead, you need to have a DNS server somewhere which is the primary for your domain and that has an entry pointing to your IP address.
Before hosting a public web site, you should familiarize yourself with these concepts, or just use a company that handles all this for you.