Configure DNS Over HTTPS in Firefox - gHacks Tech News

Configure DNS Over HTTPS in Firefox

DNS over HTTPS is a relatively new feature to improve the privacy, security and connection reliability of DNS look-ups; the feature is currently in draft status and tested by companies such as Google, Cloudflare or Mozilla.

DNS resolves play an important part on today's Internet; domain names that you enter in your browser's address bar need to be linked to IP addresses, and that is what DNS is used for.

These DNS look-ups happen automatically and often without any form of encryption or protection from prying eyes or tampering.

Internet users up until now had options to connect to a non-leaking VPN provider, switch the DNS provider to one that promises better privacy and security, or use DNSCrypt to improve privacy and security.

DNS Over HTTPS in Firefox

firefox network trr dns over https

DNS Over HTTPS offers another option. Mozilla added the core functionality in Firefox 60 and plans to run a test in Firefox Nightly to find out how good of a solution the new technology is.

Firefox users who run Firefox Nightly may configure the browser to use DNS over HTTPS right now.Type about:support to check the version of Firefox; it if it at least version 60.x, you may configure the feature. Please note that this may lead to connectivity issues (which may be limited by configuring a fallback).

It is necessary to change three Trusted Recursive Resolver preferences in the browser.

  1. Load about:config in the Firefox address bar.
  2. Confirm that you will be careful if the warning page is displayed.
  3. Search for network.trr.mode and double-click on the name.
    • Set the value to 2 to make DNS Over HTTPS the browser's first choice but use regular DNS as a fallback. This is the optimal setting for compatibility.
    • You can set it to 1 to let Firefox pick whichever is faster, 3 for TRR only mode, or 0 to disable it.
  4. Search for network.trr.uri. Firefox expects a DNS over HTTPS server. Double-click on the name. There are two public ones that you may use,
    1. https://mozilla.cloudflare-dns.com/dns-query
    2. https://dns.google.com/experimental
  5. Search for network.trr.bootstrapAddress and double-click on it.
    1. Set the value to 1.1.1.1 (if you set Cloudflare)

Note: Mozilla has a special agreement with Cloudflare which limits the logged data and data retention. Cloudflare launched the public DNs service 1.1.1.1 yesterday which supports DNS over HTTPS as well.

Tip: Check out our Firefox DNS over HTTPS article which lists all available parameters and what they do.

Closing Words

The core benefit of DNS over HTTPS is that you limit exposure of your DNS queries. You need to trust the public provider, Cloudflare or Google are the only ones right now. It is likely that other providers will introduce support for it if the feature is integrated into the stable versions of popular web browsers.

Now You: Have you changed the DNS provider on your devices?

Summary
Configure DNS Over HTTPS in Firefox
Article Name
Configure DNS Over HTTPS in Firefox
Description
DNS over HTTPS is a relatively new feature to improve the privacy, security and connection reliability of DNS look-ups; the feature is currently in draft status and tested by companies such as Google, Cloudflare or Mozilla.
Author
Publisher
Ghacks Technology News
Logo

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:

Comments

  1. Kevin said on April 2, 2018 at 4:11 pm
    Reply

    Interesting. Do you have any thoughts on 1.1.1.1 ?
    https://blog.cloudflare.com/announcing-1111/

  2. Maelish said on April 2, 2018 at 4:14 pm
    Reply

    How do you know when it’s working?

    1. Martin Brinkmann said on April 2, 2018 at 4:25 pm
      Reply

      You could set the value to 3 to enforce the use and see what happens. I’m not entirely sure how to see that easily, you could monitor traffic as suggested here: https://www.robertputt.co.uk/securing-dns-traffic-with-dns-over-https.html

    2. Mart said on April 3, 2018 at 8:31 am
      Reply

      about:networking#dns . if all TRR entries = “false”, it’s not working.

  3. Kevin said on April 2, 2018 at 4:31 pm
    Reply

    Sorry Martin, started at the top and was working my way down.

  4. Anonymous said on April 2, 2018 at 4:33 pm
    Reply

    Cloudflare will “only” collect the following…
    https://developers.cloudflare.com/1.1.1.1/commitment-to-privacy/privacy-policy/firefox/

    No thanks.

    1. jupe said on April 2, 2018 at 5:34 pm
      Reply

      Quote:
      >All of the above information will be stored briefly as part of Cloudflare’s temporary logs, and then permanently deleted within 24 hours of Cloudflare’s receipt of such information

    2. T J said on April 2, 2018 at 6:29 pm
      Reply

      @ Anonymous

      I second your “no thanks”. WHY is all this information required by Cloud flare ?? :(

    3. Steven Stevenson said on April 2, 2018 at 6:40 pm
      Reply

      @Anonymous Replied out of the comment tree by mistake: See here https://www.ghacks.net/2018/04/02/configure-dns-over-https-in-firefox/#comment-4368109

    4. Anon77 said on April 3, 2018 at 4:15 am
      Reply

      Much less than what the ISP collects (ie everything)

      1. John said on May 3, 2018 at 9:46 pm
        Reply

        LOL #Fact

  5. dark said on April 2, 2018 at 4:40 pm
    Reply

    Interesting feature. :)

  6. jupe said on April 2, 2018 at 5:32 pm
    Reply

    Doesn’t work for me on 61 and setting number 3 with either provider address.

    1. Anonymous said on April 2, 2018 at 7:13 pm
      Reply
      1. jupe said on April 2, 2018 at 9:30 pm
        Reply

        Thanks for the info, but I still can’t get it to work, accoding to user ak in the comments of this page it needs further steps also:

        https://www.ghacks.net/2018/03/20/firefox-dns-over-https-and-a-worrying-shield-study/

        but I still couldn’t get it to work after following them either, I am on todays FF Nightly.

      2. Anonymous said on April 3, 2018 at 5:53 am
        Reply

        Same here. But after changing this value

        network.trr.bootstrapAddress;1.1.1.1

        the DoH works fine in Firefox

      3. jupe said on April 3, 2018 at 11:40 am
        Reply

        Thanks for your help, I got it going adding that setting too, Martin should add that info in the article IMO.

      4. Suzy said on April 3, 2018 at 5:55 am
        Reply

        Change this line too:
        network.trr.bootstrapAddress
        with value 1.1.1.1

        That works for me

  7. Sophie said on April 2, 2018 at 5:34 pm
    Reply

    >>>You need to trust the public provider, Cloudflare or Google are the only ones right now.

    Trusting Google is sort of like trusting…………Facebook

  8. Steven Stevenson said on April 2, 2018 at 6:38 pm
    Reply

    Then if you read a bit further…

    All of the above information will be stored briefly as part of Cloudflare’s temporary logs, and then permanently deleted within 24 hours of Cloudflare’s receipt of such information.

    Cloudflare will **not retain or sell or transfer** to any third party (except as may be required by law) **any personal information, IP addresses or other user identifiers** from the DNS queries sent from the Firefox browser to the Cloudflare Resolver for Firefox

    1. Anonymous said on April 2, 2018 at 7:47 pm
      Reply

      Then you read a bit further :)

      Cloudflare will not sell, license, sublicense, or grant any rights to your data to any other person or entity without Mozilla’s explicit written permission.

      WHY is this data needed for 24 hours if not used oh wait, they can sell it if Mozilla agrees?

      1. Jerry Kindal said on April 2, 2018 at 9:24 pm
        Reply

        Having some logs around is helpful for troubleshooting. I’m not really bothered by that, though I would appreciate an explicit statement in their policy to the effect that this data is intended solely for that purpose.

      2. Steven Stevenson said on April 3, 2018 at 1:17 am
        Reply

        > WHY is this data needed for 24 hours if not used oh wait

        @Anonymous

        For network protection. Even fucking Startpage keeps some data for a day IIRC, and they have the best privacy policy I’ve ever seen

      3. John Fenderson said on April 3, 2018 at 1:18 am
        Reply

        “oh wait, they can sell it if Mozilla agrees?”

        That popped out at me too. It’s pretty strange and not terribly conducive to trust to put a loophole into their “we won’t abuse you” clause.

      4. Steven Stevenson said on April 3, 2018 at 1:22 am
        Reply

        You’ll also note that user IP somehow isn’t in the list: Resolver IP address refers to something else though this needs to be double checked

      5. MAtt M said on April 3, 2018 at 6:16 am
        Reply

        Sometimes it looks like a service is running great, then you check the logs and your service is practically in flames.

  9. Mart said on April 3, 2018 at 8:22 am
    Reply

    …for dns over https in firefox beta 60: do i have to set network.trr.bootstrapAddress : 1.1.1.1 to, when i’m already using the public DNs service 1.1.1.1 ?

  10. SheepKid12 said on April 3, 2018 at 11:27 pm
    Reply

    Use “https://developers.cloudflare.com/1.1.1.1/dns-over-https/request-structure/” instead of the other one.

    Source: https://developers.cloudflare.com/1.1.1.1/dns-over-https/request-structure/

  11. xxx said on April 4, 2018 at 4:06 am
    Reply

    Martin, could it bypass Squid censorship?

  12. Anonymous said on April 4, 2018 at 9:21 am
    Reply

    Just notice if you do this on Firefox for Android, host based adblocking won’t work, which make sense since it relies on DNS lookups.

  13. TelV said on April 4, 2018 at 12:18 pm
    Reply

    My VPN (Mullvad) has their own DNS server so everything is routed through them.

  14. L said on April 15, 2018 at 8:00 am
    Reply

    I doesn’t work on Android :/

    Anyone having it working on Android?

  15. asad said on April 17, 2018 at 2:19 am
    Reply

    dnscrypt + a non logging servers. High time builds include this by default…

  16. masoud said on April 22, 2018 at 7:13 pm
    Reply

    why it’s not working for me:(

    my config :
    http://uupload.ir/files/opnn_untitled.png

    1. vali said on April 29, 2018 at 1:12 pm
      Reply

      remove adrees from “NS” or reset it.

  17. Anonymous said on April 24, 2018 at 8:54 am
    Reply

    The name “network.trr.bootstrapAddress” used to have to have a value of 1.1.1.1. But now it only works for me if I reset it to default, which is empty.

  18. Anonymous said on April 29, 2018 at 2:03 pm
    Reply

    it’s worked but not worked as well. When I’m trying to open any blacklisted adress, I got this error…

    SSL_ERROR_RX_RECORD_TOO_LONG

  19. Anonymous said on April 29, 2018 at 4:06 pm
    Reply

    dosnt work with blocked pages.

    1. cj said on April 29, 2018 at 11:18 pm
      Reply

      i agree :(

  20. pene said on May 5, 2018 at 2:07 pm
    Reply

    I never bothered to run bleeding edge nightly versions but now that my country (S. Korea) started to censor[1] DNS request entirely (yes, entirely—even if you use third party dns like 8.8.8.8 or 1.1.1.1..its done at packet inspection level), I turned to nightly and thank you my internet is free again (well, at least until they introduce SNI censorship..which they promised to implement by 2019)

    [1] https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&ie=UTF-8&u=http%3A%2F%2Fwww.mcst.go.kr%2Fweb%2Fs_notice%2Fpress%2FpressView.jsp%3FpSeq%3D16672&edit-text=&act=url
    couldn’t find english resource. the detail is in the attached file which says they will (and has started by now) censor dns request then will implement sni censoring to block chosen https sites eventually. its said to be done for “Prevention of copyright infringement” purpose.

  21. TimeLoopMark said on May 10, 2018 at 4:33 am
    Reply

    I’ve waited for Firefox 60 to be released to test this because I run the stable branch of the browser. Now that it’s out, I can confirm that it’s working wonderfully and so far it’s running really well even on TRR only mode using Cloudflare.

    Great guide and article.

  22. Malte said on May 10, 2018 at 12:38 pm
    Reply

    If i have cloudflare dns already setup in the router do i still need to change anything in the about:config?

    1. TimeLoopMark said on May 10, 2018 at 7:18 pm
      Reply

      Most current stock configurations resolve domains without encryption even if you’re using Cloudflare DNS (1.1.1.1) or Google DNS (8.8.8.8), unless you’re using something similar to Simple DNSCrypt for example.

      DoH as explained in the article is about utilizing a DNS resolver over HTTPS within Firefox, so no other party would know which domains you’re visiting, except for the resolver you’re trusting, of course.

      So if your router is configured already over HTTPS, then no, you don’t need to do anything. However, if it’s configured normally just by filling the two DNS IP fields, then yes, you should do it on Firefox as well or as I said earlier use tools such as Simple DNSCrypt.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.