I am hosting some videos on Google Drive.
Basically, I'd like to "mask" the download URL's of the videos with that of my own domain.
As of current, the links look like
https://drive.google.com/uc?id={id}&export=download
I'd like the links to be my example.com instead of google.com
At first, I tried inserting a cname record (eg. drive.mydomain.com -> drive.google.com) however, Google returns a 404 error in that case.
Can this be done?
In order to download a file from a server, the server must know the requested URL. If you add a CNAME record like yourdomain.com CNAME goole.com
, the client will know the IP of the google server, but the requested URL will not be recegnized by the google web server, concequently will respond with a 404 error.
That said, there is no way to get a correct response from a server "masking" the domain name.
One workaround (maybe overkill), could be to create an script to temporary download the file from google to your server then send that file from your server to the final client.