• 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

    • You're absolutely right! No reason in hell these should be on the road!
    • They aren't going to want to. Most would just go with the 17 Pro and save money. Why would they want to spend $300 for basically the same thing? It's not worth it if there are hardly any changes from year to year.
    • 24H2 rolled out to the Release Preview Channel in early June 2024, so this coming a bit later in the Experimental Channel (formerly Dev) doesn't really say much more than earlier H2 releases that came out in October. I am not sure what the thinking is here by putting it in Experimental, one would think that the 26H2 stamp means features are locked down and it's now bug tested until October? I don't even pretend to understand Microsoft's strategy for Windows Insider Program though
    • Nothing Ear (a) and CMF Buds Pro 2 with active noise cancellation drop to lowest price ever by Fiza Ali With Prime Day 2026 scheduled to run from Tuesday 23 to Friday 26 June, Amazon has already begun rolling out early access offers ahead of the main event. Particularly, Nothing Ear (a) and CMF Buds Pro 2 wireless earbuds have dropped to their lowest price ever with limited Prime deal offering 33% and 24% discounts, respectively. Nothing Ear (a) are equipped with 11mm dynamic drivers featuring a PM1 + TPU diaphragm. For noise control, the earbuds offer active noise cancellation (ANC) of up to 45dB across frequencies reaching 5,000Hz. The smart ANC algorithm adapts to surrounding noise levels, while a Transparency Mode allows users to remain aware of their environment when needed. Connectivity is handled via Bluetooth 5.3, with support for AAC, SBC, and LDAC audio codecs. Additional features include IP54-rated earbuds for dust and splash resistance, paired with an IPX2-rated charging case. Furthermore, users also benefit from pinch controls, in-ear detection, Google Fast Pair, Microsoft Swift Pair, dual-device connectivity, and a low-latency mode designed for gaming and video playback. The Nothing X app unlocks a range of customisation options, including a personalised equaliser, bass enhancement, control remapping, ear tip fit testing, firmware updates, dual-device management, a Find My Earbuds feature, and low-latency mode settings. When it comes to the battery, the earbuds house a 46mAh lithium-ion battery, while the charging case contains a 500mAh cell. With ANC disabled, users can expect up to 9.5 hours of playback from the earbuds and up to 42.5 hours in total with the charging case. With ANC enabled, battery life is rated at up to 5.5 hours per charge and up to 24.5 hours combined with the case. Finally, fast charging is also supported that should provide up to 10 hours of playback from a 10-minute charge with ANC turned off. Nothing Ear (a) Wireless Earbuds (Black): $53.20 (Amazon US) - 33% The CMF Buds Pro 2 feature a dual-driver audio system consisting of an 11mm bass driver and a 6mm micro-planar tweeter. The earbuds use PU (polyurethane) and PET (polyethylene terephthalate) titanium-coated diaphragms and are tuned by Nothing to deliver balanced audio performance. They further support active noise cancellation of up to 50dB across a frequency range of up to 5,000Hz, and noise control features include a Smart ANC algorithm, Adaptive ANC, Transparency Mode, and Clear Voice Technology 2.0. For calls, the CMF Buds Pro 2 use a total of six microphones and feature an environmental noise-cancelling algorithm, Clear Voice Technology 3.0, and Wind Noise Reduction 3.0 that should improve voice clarity during conversations. Furthermore, when it comes to the connectivity, it is provided through Bluetooth 5.4. Additional features include an IP55 rating for dust and water resistance, Google Fast Pair, Microsoft Swift Pair, in-ear detection, a low-latency mode, and a Find My Earbuds function. Moreover, through the Nothing X app for Android and iOS, users can access custom EQ settings, a bass enhancement algorithm, customisable controls, Find My Earbuds, low-latency mode, dual-device connectivity, an ear tip fit test, and firmware updates. The earbuds contain a 60mAh rechargeable lithium-ion battery, while the charging case houses a 460mAh battery. A full charge of the earbuds and case via USB-C should take approximately 85 minutes, while the earbuds alone should be fully recharged in the case in around 60 minutes. Battery life is rated at up to 11 hours of playback on a single charge and up to 43 hours with the charging case when ANC is turned off. With ANC enabled, playback time is reduced to up to 6.5 hours on the earbuds and up to 26 hours with the charging case. Talk time is rated at up to 6 hours on the earbuds and 25 hours with the case with ANC disabled, or up to 4.8 hours and 18.6 hours, respectively, with ANC enabled. CMF Buds Pro 2 Wireless Earbuds (Dark Grey): $37.05 (Amazon US) - 24% Good to know This Amazon deal is U.S. specific, and not available in other regions unless specified. We only use first-party seller links (at the time of article publishing); ensure that you purchase from a first-party seller link only. Check out Today's Deals on Amazon | or our recent tech deals. Become a Prime member (for Students or SNAP) via Neowin Get Prime Access - Prime for half price (for qualifying Medicaid, EBT, SNAP) Subscribe to Prime Video, Audible Plus, Music Unlimited or Kindle Unlimited via Neowin As an Amazon Associate, we earn from qualifying purchases.
  • Recent Achievements

    • Week One Done
      AMV earned a badge
      Week One Done
    • One Month Later
      AMV earned a badge
      One Month Later
    • Collaborator
      ryansurfer98 went up a rank
      Collaborator
    • One Month Later
      Eurosoft10 earned a badge
      One Month Later
    • Week One Done
      Eurosoft10 earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      542
    2. 2
      +Edouard
      186
    3. 3
      Michael Scrip
      77
    4. 4
      PsYcHoKiLLa
      76
    5. 5
      Steven P.
      71
  • Tell a friend

    Love Neowin? Tell a friend!