How does my router resolve a URL like http://router.asus.com/ to its IP address?

Your router has its own DNS server. When you do use it online, it'll forward to your ISP's DNS, but it's also added its own entry at router.asus.com to point to itself.

As you're likely using DHCP, it'll automatically assign your machines to use its own DNS. You could test this by changing to a manually assigned DNS server (8.8.8.8 for example), flush your DNS and then try the same URL.

Note that visiting router.asus.com with my connection takes me to a site hosted with Amazon that appears to try and scan for a compatible router on my network.

Screen shot of site at router.asus.com

Looks like it uses the following JQuery to try and grab a specific JSON file from a Machine Name on the network:

$.ajax({
            url: "http://" + target.domainName + "/findasus.json", 
            dataType: "jsonp",
            timeout: 20000,
            global: true,
            complete: function(jqXHR, textStatus){
                switch(jqXHR.status){
                    case 0:
                        target.status = 2;
                        break;
                    default:
                        target.status = 1;
                        iAmAlive({
                            modelName: target.domainName.replace("findasus.local", "ASUS"),
                            ssid: "",
                            ipAddr: target.domainName
                        });
                }

                sessionComplete();
            }
        });

You can see the names it tries to access in the screenshot. Literally just loops through and if it gets a hit it'll redirect to what it found.


I don't personally own an Asus router, and Jonno's answer is very good, but there's another possible way for routers to accomplish this (even if it's not used by your particular one).

Since that page isn't served over HTTPS, it's entirely possible for the router to simply intercept the HTTP request and answer it without talking it any external server. Asus routers have been known to redirect pages under some circumstances. Note that if the redirection occurs even without an Internet connection (i.e. with no external DNS), it must be caused by your router's DNS; there's no reason both couldn't be going on, though.

My Netgear home router, for instance, can block domains and keywords (serving a "blocked by Netgear firewall" page) even if I'm not using its DNS. I made sure that it's not intercepting the DNS requests; the name gets resolved correctly, but going to the page in a web browser results in the "blocked" page.

You can test this theory by setting your DNS servers to, say, Google's (8.8.8.8) and pinging the redirected domain name.

Tags:

Ip

Dns

Router