Case 1: WWW=https://example.com#foo Here #foo is not part of the value of WWW since # introduces a comment whether it's part of a word or not (quoting the word+# makes no difference either). # needs to be escaped: WWW=https://example.com\#foo Case 2: WWW=https://example.com #foo This is probably fallout from when WWW was moved from pkg-descr to Makefile. The anchors still exist on the actual websites too or I removed them.