How do I redirect a FQDN to an internal URL?

How do I redirect a FQDN to an internal URL? - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the How do I redirect a FQDN to an internal URL? error on your web browser. Problem :


We have internal DNS servers where we've registered a FQDN that resolves internally to identityreg.domain.com.



We also have an existing web page at https://iamserver.domain.com/product/default.asp?Workflow=process1.



We need our users to be redirected to the existing web page URL whenever they type identityreg.domain.com.



We're using IIS for the web server. I'm a newbie here so forgive any misuse of terms. How do I get the FQDN to redirect to the URL?


Solution :

Your situation is not exactly clear, but I suspect that you want anyone who access your domain name from the internet to actually access the sub-domain internal server which may or may not be available via the Internet. If the server is not available to the Internet, you can use a proxy server. The proxy hosts the domain name and modifies the packet header and forwards it to the internal server and back again to the user. Some firewalls can do this. Otherwise, if your internal server is available to to the Internet then you can use .htaccess (assuming Apache) to do a blanket redirect to your sub-domain site. Examples of 301 redirect root domain to www can be modified for your purposes.



You have two choices.




  1. You allow Internet traffic on port 443 on the machine within the internal network.



Something your sysadmins might now want you to. If you don’t have sysadmins, please don’t :)




  1. Re-use another already server already exposed to the Internet.



This is what we call a "Proxy", a fancy term to say "server for". There are many ways to do, I’m not into Microsoft servers, bear with me for using Open-source only instructions.




  • Know what is the internal IP of that server, and port (e.g. 10.10.2.33, port 8080)

  • Make sure your exposed server has SSL (just saying :))

  • Create a context root from that web server (i.e. a "folder" that is on another server)



    If your public server is using NGINX, it would look like this:



    ```
    server
    listen 443 ssl;
    server_name iamserver.domain.com;

    location /product {
    proxy_pass http://10.10.2.33:8080;
    }

    ```



This is it.



Advice:



Trusting the network If you trust the internal network (e.g. its the same physical machine, same VLAN, only your company is using it), you do not need SSL. Otherwise, you would need to have another SSL connection between that proxy and the web app server.



Domain name can have different IPs. Its possible to have a DNS server on the public Internet to point to a different IP address.



I recommend you separate the servers by their role —VMs are so cheap nowadays. If a service that is through a web browser is required to be used publicly, its a sign you need to move things around and make sure its consistent both in the internal network and the public internet to everything related to this particular web app.


We hope that this article has helped you resolve the redirects, dns, error in your web browsers. Enjoy browsing the internet uninterrupted!

Comments

Popular posts from this blog

How to redirect to any domain [duplicate]

"302 found" for index page bad for SEO?

Create redirect from url like www.example.us/?p=100&option=