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.

2
  • Is there any reason just using https://<ip address>:port doesn't work? – heavyd May 18 '15 at 16:10
  • @heavyd, I have multiple sites hosted on one ip – nullUser May 18 '15 at 18:59
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.

1
  • 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. – jacobq Sep 19 '19 at 20:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.