I use the openDNS servers : / as DNS provider for my PC.

When I go to an inappropriate http:// (adult content), I got redirected to https:// open dns site.

I just wonder how a DNS server can redirect from HTTP to HTTPS content ?

(and eventually How to disable that ?)

closed as off-topic by Andrew B, Ward, womble, Jenny D, masegaloeh Aug 10 '15 at 20:51

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow." – Andrew B, Ward, womble, Jenny D, masegaloeh
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Consult the OpenDNS documentation. You can't control when remote DNS servers rewrite the IP address they give you. Either they give you a way to adjust the behavior, or they don't. The only reason why you should have to touch /etc/hosts for this kind of thing is if you don't control your network (and are trying to circumvent policy), or you haven't read the docs. Neither of those are problems we can fix. – Andrew B Aug 9 '15 at 19:14

Some addon exist to prevent http redirect. The problem is some legit site use redirect.

Like illustrated there https://superuser.com/questions/565409/chrome-how-to-stop-redirect-from-http-to-https

Web filtering, from a router or websense can catch such webtraffic and do the redirect, but its not the dns that do that


DNS is not responsible for that and does not have that capability. Some kind of URL rewriting mechanism in the web server is the one doing the redirect from HTTP to HTTPS by issuing a 301 redirect response to the original request.

  • ok: perfect: But can I prevent that using the HOSTS file ? – yarek Aug 9 '15 at 13:18
  • I don't think that from the client side you can do much to prevent that from happening since it's something happening at the server side. Since the name resolution is not the issue, touching the hosts file or the DNS server won't change anything. You might want to look at the "Warn me when websites try to redirect or load the page." option in Firefox. This option stops a redirect from occurring, and notifies you of the situation. You may then allow or deny the redirect. – Gabriel Talavera Aug 9 '15 at 13:23

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