Domain name redirection to static IP

armasousou Posted messages 1351 Status Member -  
 X -
Hello,

I have a server running Windows Server 2012, with a site on ASP.Net
It works well through my domain name (GoDaddy). But when I access the site via the domain name, instead of having a "domain.com", the URL in the browser shows "xxx.xxx.xxx.xxx".

Does anyone know why and how to fix this?

Thank you in advance :)

2 answers

  1. jivef Posted messages 1024 Status Member 306
     
    Hello,
    What do you use for your WEB server?
    IIS or Apache?

    I think the problem comes from the settings of your "internet server" software

    Good luck!
    0
    1. armasousou Posted messages 1351 Status Member 83
       
      IIS :)
      0
      1. jivef Posted messages 1024 Status Member 306 > armasousou Posted messages 1351 Status Member
         
        Check your site settings in IIS.
        I'm not very familiar with IIS, I mostly work under GNU/Linux and with Apache...

        But I think you need to look in the IIS settings concerning the sites.
        0
  2. X
     
    Hello,

    If the domain name is replaced by the IP, it means there is a redirect.
    The purpose of the redirect is to display the full URL of the page rather than just the server's IP, but this also changes the URL displayed in the browser.

    So there are three possibilities:
    - GoDaddy is redirecting to a page on your site
    - IIS is configured to perform a redirect (which is not the default case)
    - redirect executed directly from the ASP.NET code

    So first, in GoDaddy, did you correctly add an A record with your IP and not set up a redirect using the IP as the URL?

    Otherwise, in IIS, you just need to open the "web(.config)" file at the root of the site and check that there is no: "<action type="Redirect" .../>"

    Finally, for ASP.NET, if you wrote the code, there's little chance you made a redirect by mistake; otherwise, check the site settings to see if there is a URL to configure.
    0