Resolving non www with domain

I have fresh copy of PiHole 5 running and loving it so far. It is handling DHCP, internal DNS hosts, and my sole DNS server.

One issue I am having is with resolving entries that do not have the WWW in front. For example, Fedex.com sends me a text with tracking number and it fails to load in my browser. But if I insert a WWW in front, it works fine. One that really doesn't work is weather.com. It forces me back to https://weather.com even if I put in the www. My workaround at the moment is to turn off wifi on my phone and refresh the browser using the carrier's DNS servers.

I'm sure I am missing something stupid. Anyone care to let me know what that is?

To me more clear, weather.com does show up in the query log as being blocked by Gravity. I can click the "white list" button and it will work from then on without the www. But I would have to do this for any new site.

I'm trying to understand what it is you are looking for here, but failing :slight_smile:

So, you want to be able to access www.weather.com, but it redirects you to weather.com? That is determined by the website, and not something Pi-hole can control.

What is it you are trying to achieve by visiting www.weather.com instead of plain weather.com?

actually other way around. If I click on a link that is just "fedex.com", it fails to resolve with an error that Gravity blocked it. That is a link sent to me by Fedex, I'm not typing it. If I manually add a www. to the front of the link in my browser it will work. If I whitelist it in Gravity, it will work. In the case of weather.com, it is different. Try it in your own browser. If you enter "http://www.weather.com", it will redirect to "https://weather.com" dropping the www part. Again, it fails but adding the www doesn't work becuase the re-direct strips it out.

The link is likely not using just Fedex.com, it likely has at least one direct in it, containing some details about the email they sent you.

Right click or control click on the link you are opening, and copy the URL to clipboad and paste it here.

I assume these are links to the weather.com website from an email?

Loading either www.weather.com or weather.com takes me directly to the weather.com website.

dig +short weather.com
23.55.208.228

dig +short www.weather.com
pmd-www.weather.com.edgekey.net.
e12930.ksd.akamaiedge.net.
23.55.208.228

What is being blocked in your case when you load either of these two domains?

It won't let me post my full nslookup results because it contains more than 5 links but here is a subset:

Default Server: pihole
Address: 10.0.0.3

www.weather.com

Non-authoritative answer:
Name: e12930.ksd.akamaiedge.net
Address: 184.28.44.224
Aliases: www.weather.com [and some other ones]

weather.com

Name: weather.com
Addresses: ::
0.0.0.0

I don't understand the problem you are experiencing. Whether you use either of the two following domains to load the site, the domains lead to the same place. The use of http or https as the protocol is not related to any part of the domain name:

weather.com
www.weather.com

What needs to be whitelisted? Are you clicking an email link that leads to a Weather Channel site?

When you post the reply, format that block of text as a code block. Highlight the block, then use the </> tool in the reply window and this will strip the hyperlinks.

Name: e12930.ksd.akamaiedge.net

becomes

Name: [e12930.ksd.akamaiedge.net](http://e12930.ksd.akamaiedge.net)

I agree that is how it is supposed to work, but for me weather.com fails and is blocked by Gravity in PiHole. www.weather.com is redirected back to weather.com so I can't go there at all without whitelisting it. If i pick a different DNS server, both url's work.

This may be due to the new CNAME blocking feature. If you whitelist the weather.com site, regardless of what happens farther down the CNAME chain that would result in a block, this website will load.

But, let's check to see what is happening:

What is the output of the following command from the Pi terminal:

pihole -q -adlist -exact weather.com

And, in your query log on the admin GUI, what is shown in the status column for the domain weather.com when it was requested? You can take a screen snap and post that directly into a reply.

I did a search in the GUI for weather.com in the white lists, black lists, and adlists but came up blank.

I'm not sure why a list maintainer would put weather.com on their blocklist, but somebody appears to have done it. This is the drawback to using a lot of block lists.

Your solution in this case is to whitelist weather.com. This essentially makes this domain gravity proof - regardless of what blocklist might block it, or if it leads to a CNAME that is blocked, you are telling your Pi-hole to load it.

That was actually supposed to be a list for the whitelist side but I must have put it in the wrong spot. Thanks for solving the mystery!

You may want to reconsider adding the contents of that list as whitelist entries. There are 7600+ domains on that list, the vast majority of which you won't want or need whitelisted.

amazon-adsystem.com
google-adservices.com
google-analytics.com
marketingplatform.google.com
...

Note you can't add a URL of entries to the whitelist, just domains or groups of domains. It doesn't work like the block list import.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.