# How to hide URL

**URL:** <https://forum.kirupa.com/t/how-to-hide-url/669208>\
**Category:** programming\
**Created:** [August 23, 2024, 8:28am UTC](https://forum.kirupa.com/t/how-to-hide-url/669208 "2024-08-23T08:28:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Helena\_G](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/helena_g/32/11549_2.png) [@Helena\_G](https://forum.kirupa.com/u/Helena_G)\
**Post date:** [August 23, 2024, 8:28am UTC](https://forum.kirupa.com/t/how-to-hide-url/669208/1 "2024-08-23T08:28:40Z")

</div>

**Hello,**

I run a media site where the majority of the content consists of images served via a paid CDN. Recently, I discovered that I can serve my images for free using JS Delivr. However, I’m concerned that my competitors might do the same, as the cost of a CDN currently serves as a barrier to entry in this field.

I’ve tried encoding and shortening the URLs, but they can easily be decoded and unshortened. ChatGPT suggested serving images via a proxy server, but I don’t have that option with my shared hosting account. The provided list of proxy servers seems more like VPN tools for secure browsing rather than for my specific needs.

Could you please help? How can I hide (disguise, obfuscate …) my links, such as `https://cdn.jsdelivr.net/gh/user/repo@version/file`, to prevent competitors from easily accessing them?

Thank you very much in advance.

Helena

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [August 23, 2024, 4:21pm UTC](https://forum.kirupa.com/t/how-to-hide-url/669208/2 "2024-08-23T16:21:38Z")

</div>

Hi @Helena_G - there is no way to do this. The moment an image hits the browser, you can easily access the URL via the Chrome Dev Tools ☹

---

<div class="post-metadata">

**Author:** ![Helena\_G](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/helena_g/32/11549_2.png) [@Helena\_G](https://forum.kirupa.com/u/Helena_G)\
**Post date:** [August 24, 2024, 5:59pm UTC](https://forum.kirupa.com/t/how-to-hide-url/669208/3 "2024-08-24T17:59:39Z")

</div>

Thank you, @kirupa 🙂

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [August 24, 2024, 7:16pm UTC](https://forum.kirupa.com/t/how-to-hide-url/669208/4 "2024-08-24T19:16:27Z")

</div>

Now, what you could do is make it very difficult for someone to save your image. You could break up the image into hundreds of smaller images and send those over the wire instead. That doesn’t prevent someone from just screenshotting the image and saving it, so it would only add some friction. It wouldn’t outright stop the copying.

---

<div class="post-metadata">

**Author:** ![Helena\_G](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/helena_g/32/11549_2.png) [@Helena\_G](https://forum.kirupa.com/u/Helena_G)\
**Post date:** [August 25, 2024, 10:49pm UTC](https://forum.kirupa.com/t/how-to-hide-url/669208/5 "2024-08-25T22:49:08Z")

</div>

Thank you, @kirupa! 😊  
In my case, they won’t take screenshots because they need high-quality images, and taking screenshots takes time.

Currently, the images are all in a public GitHub repository and served via JS Delivr CDN. I’m very happy with the service, and it’s completely free. However, I feel a bit exposed since anyone can easily access the images via the URLs. 😟 (and steal the method)

Could you please explain what you mean by “breaking up the image into hundreds of smaller images and sending those over the wire instead”? I’ve never heard of this approach before.

Thank you very much in advance!

---

<div class="post-metadata">

**Author:** ![Ashu12](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ashu12/32/26837_2.png) [@Ashu12](https://forum.kirupa.com/u/Ashu12)\
**Post date:** [August 28, 2024, 5:06pm UTC](https://forum.kirupa.com/t/how-to-hide-url/669208/6 "2024-08-28T17:06:35Z")

</div>

To protect your image URLs from being easily accessed by competitors, you can use a few strategies. One effective method is to implement URL tokens that generate unique, expiring links for each request, which helps prevent reuse[.](https://errotech.shop/) Another approach is to serve images through a script on your server that dynamically generates and proxies URLs, thus hiding the actual source. Additionally, obfuscating URL path elements, such as encoding segments or using non-descriptive structures, can make direct access more difficult. Finally, if your hosting provider supports it, restrict access to your media files through referrer checks or IP whitelisting. These techniques can help keep your image URLs concealed while using JS Delivr for cost-effective hosting.

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [August 28, 2024, 5:11pm UTC](https://forum.kirupa.com/t/how-to-hide-url/669208/7 "2024-08-28T17:11:47Z")

</div>

This is similar to how Google Maps works works where a large map is sent as smaller image tiles. Here is an example of how one person did this: [How to tile very large image files - Stack Overflow](https://stackoverflow.com/questions/70262629/how-to-tile-very-large-image-files)

In your case, the image may not be quite that large. You are doing it to make it difficult for someone to right-click on an image once and save it to their desktop.
