• 0

Alternative Options to Referer in HTAccess


Question

Hey Guys,

 

While cruising a few IRC channels over the weekend, I suggested someone use htaccess to block other websites from hotlinking. I was chastised up the ying-yang for that suggestion. They said that referrer information isn't transferred through TLS, and that it can cause issues for the end user. I wasn't aware of this, nor has anyone ever told me of this.

 

So my question is; what's an alternative? They said to just let it happen, it's not a big deal. Sorry, but I don't want someone else linking stuff from my services to someone elses site.

3 answers to this question

Recommended Posts

  • 0

If I am reading this correctly from the article - http://alistapart.com/article/hotlinking , even if the referrer is not passing, if you configure it properly then TLS pages (as mentioned) will still be able to access the images.

 

Also, I tried to google about 'neowin' and then open the news page, which is in HTTPS as shown in the below image but it was still having referrer information. (If I not mixing stuff up)

 

Correctly.PNG

  • 0

where did you read that referrer is not in a tls connection?  Are you talking a link from a https site to a http?  If so then yeah browsers do not send the referrer, this is in this rfc https://www.w3.org/Protocols/rfc2616/rfc2616-sec15.html#sec15.1.3

 

Clients SHOULD NOT include a Referer header field in a (non-secure) HTTP request if the referring page was transferred with a secure protocol.

 

You can use the newer Meta Referrer which modern browsers support.  A browser can be set not to send referrer info, so its always possible to bypass such a block if your saying that access to your stuff can not be a referred link, etc.

 

What exactly are you trying to prevent?  If you put up say an image, and you want to stop other pages from linking to it?  Why did you put up the image?  Why do you not require auth to access the image if you don't want others using it, etc.  if you put it up on the public net your kind of saying hey use this, etc ;)

 

Don't provide http to your images another thing you can do.  https to https should send referrer info, etc.  If your page is not available http then then you shouldn't be seeing the https to http issue where referrer is missing, etc.  But again this does not stop access, this really just stops idiot webpages from linking to your ###### and not sending you referrer info.  If they send you referrer info then sure you can use .htaccess to block if that is what you desire.

 

What exactly did they say it would break.. Who gives a ###### what it breaks as long as it works how you want it to, ie users on your site accessing your stuff directly via your site, etc.

 

If you do not want the use of the image from anything other than your site, then you can block if the referrer is blank.  This could cause you issues if your using http links in your own site when your site is https..  But that would be just shooting yourself in your own foot ;)

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Files still rely on classic windows indexing rather than methods that 'everything' uses. So search is suboptimal. The compression algorithm list is really lacking not comparable to winrar, 7zip and peazip... The gui looks nice, but windhawk is a thing. I don't understand what files brings in 2025.
    • I think I only know of a handful of people that don't have WhatsApp - somewhat frustratingly they're my OAP group that I support. But in those situations they always prefer to phone rather than text anyway, so this won't really do much to help me. If the functionality of Guest mode is only one-to-one messages and no media transfers, I can't see it getting used that much. A group option with photo attachments would be useful for my other business to send out a notification to our clients including those that don't have WhatsApp.
    • Firefox 141.0.2 is out, fixes crashes on systems with Nvidia GPUs and more by Taras Buria A small update is rolling out for Firefox in the Release channel. Version 141.0.2 delivers three fixes to address problems with crashes on systems with Nvidia cards, web compatibility issues, and Web Developer Tool issues. Starting with the Nvidia bug, users reported that on Linux systems with older drivers, such as 560.35.03, an instant crash on startup occurs (bug 1978911). This issue does not affect Windows users. Next, the update fixed a web compatibility issue that was causing problems with canvas objects (bug 1978673). The third fix resolves Web Developer Tools crashes when inspecting pages with iframe elements (bug 1975277). Here is the full changelog from the official documentation. Firefox 141.0.2 is currently available from Mozilla's FTP only. It will start rolling out to existing users in a couple of hours. You will be able to get the update by heading to Menu > Help > About Firefox or by downloading an installer from the official website. On Windows, Firefox is also available in the Microsoft Store via this link. In case you missed it, Firefox 141 arrived a few weeks ago with a couple of new features, including AI-powered tab groups, vertical tab improvements, memory optimizations for Linux users, WebGPU support on Windows, and more features for the address bar. You can find full release notes for the update in our dedicated article.
    • Clearly a lot of gamers. And I'm sorry but you are wrong, my 7800x3d (single ccd) offers huge benefits to me as a AAA 1440p gamer. And it's pretty dumb to crap on 1080p gamers as they make up like 90+% of steam gamers. But no, the x3d does not just offer benefits to esport gamers (one of the stupidest things I've seen in a while AND THATS SAYING SOMETHING.) Abd when I built my rig with my 7800x3d, I paired it with a RX7900xt and couldn't be happier.
  • Recent Achievements

    • First Post
      Soeaker4thedead earned a badge
      First Post
    • First Post
      kryptickid earned a badge
      First Post
    • First Post
      Nemesis-IV earned a badge
      First Post
    • First Post
      Aidan Helfrich earned a badge
      First Post
    • Collaborator
      bullgod69 earned a badge
      Collaborator
  • Popular Contributors

    1. 1
      +primortal
      760
    2. 2
      ATLien_0
      187
    3. 3
      +FloatingFatMan
      151
    4. 4
      Xenon
      117
    5. 5
      wakjak
      113
  • Tell a friend

    Love Neowin? Tell a friend!