Get a direct link to files hosted in Google Drive

Update [10/2/2016]: It appears that Google has finally put a stop to this trick.

Imagine you want to use a QR code so guests at Parents’ Night can scan the code and stream video or audio straight to their mobile device. If you share the files in Google Drive, users will be taken to a Google page where they have to download the file first. But if you can create a link that points directly to the file, users can access the content right in their mobile browser.

Direct link files in Google Drive
Direct link to files in Google Drive

Turns out you can do this while still using Google Drive. Any public folder in Drive can host files and provide direct links to the files.

How to create the hosting URL:

This will provide a folder that will give direct links to files inside the folder.
Note: hosting view will not display files created in Google Docs.


Once in the hosting folder, you can right click on any of the files to get a direct link to the file.

24 thoughts on “Get a direct link to files hosted in Google Drive

  1. Like Casu, this has stopped working for me.

    The Drive UI still shows a “Hosting” URL – but it yields a 403 (permission deinied).

  2. You can also just plug the file ID itself into the hosting URL scheme (sharing must be set to either Anyone with link or Public on the web).

  3. It only works for a certain time (calls) with “/host”.
    After that it redirects to a 404 page!

    Any solutions?

  4. does not work like suggested any longer. recieving a 404 and cannot any longer even find the hosting url for forwarding from my domain server….inyone know why>

  5. My experience is that the direct link stopped working sometime after Google’s official shutdown of hosting on September 1, 2016.

    Before the shutdown I was able to use the url root as suggested by Dale

    For example this would work before the shutdown

    but now I get a 502 error.
    Is the direct link definitely still working for anyone out there? If so, how are you doing it?

    1. I found that using this link: in place of works. Note that I’m using a Google for work account where is my work domain, I haven’t discovered what link to use for personal a gmail account yet. So in your example above, I just need to add the file id to the end of this link:

      Checkout the drive files API to achieve this in a script if you have a bunch of images you need to relink to:

      I write integration scripts for a living so if you need professional help, do reach out as well.

Leave a Reply

Your email address will not be published. Required fields are marked *