How to specify domain name and ip address in URL (ignore CN)

3

Is it possible to make a request for a specific domain name at a specific ip address? Usually one looks at the domain name and then uses DNS to resolve the ip address, but I don't want to do this. I want to test updates to my website before publishing them, so I'm thinking it would be nice to say something like

https://www.example.com@ip.address:port

in chrome/firefox so I can make sure

  1. my apache config is correct, and

  2. my site works

before publishing the changes to the real site.

nullUser

Posted 2015-05-18T16:01:26.620

Reputation: 593

Is there any reason just using https://<ip address>:port doesn't work? – heavyd – 2015-05-18T16:10:07.227

@heavyd, I have multiple sites hosted on one ip – nullUser – 2015-05-18T18:59:37.453

Answers

4

There isn't a way to specify a resolver or alternative IP address to use in the address bar. This would make phishing attacks very easy.

There are several ways you can change the name resolution locally though:

You can edit your /etc/hosts file to point www.example.com to your development IP address. There are chrome extensions to help make this process easier. The first one that I found was hostadmin.

You can also use a DNS forwarder like dnsmasq to rewrite the lookups to your development IP address.

shamer

Posted 2015-05-18T16:01:26.620

Reputation: 56

I can see how it could be very bad for protocols that don't verify the server's credentials, but how would it make phishing attacks easier in the case of HTTPS? The certificate would still have to be signed by a trusted authority. – iX3 – 2019-09-19T20:22:22.167