Are you a Dropbox user? Do you frequently share files using the Public folder feature? Would you like to have the public links be something other than dl.dropbox.com?
Dropbox allows files to be placed in a “Public” folder. Each file in this folder has a special public link that can be shared with others. All files have a link in this format: dl.dropbox.com/u/useridnumber/filename.extension.
We previously showed you how to host a website for free using Dropbox, but suppose you wanted a better looking URL. Here’s how to accomplish that.
CNAME Record
With a CNAME (Canonical Name) DNS Record, you can have a custom domain or sub-domain point to dl.dropbox.com. All you need is your own domain name. Free sub-domains work too as long as you have access to DNS.
With this method, your URLs would look something like files.myowndomain.com/u/useridnumber/filename.extension. Since this method points your domain to Dropbox, there is no way to customize the sub-directories part.
- Login to your domain’s DNS control panel. This will vary depending on your domain registrar or hosting provider.
- Create a new CNAME entry for any hostname you choose, such as ‘dl’ or ‘files’ and have it point to dl.dropbox.com.

- Click save and you’re done! Remember that DNS can take up to 48 hours to fully propagate.
- Try out your new link. Copy any Dropbox public link and replace the domain name with your own.

A simple website hosted by Dropbox. Notice the URL.
Another limitation to this method is that anyone can use your custom domain for their own Dropbox links. This carries the risk of having your domain be used to serve malicious files, resulting in it being blacklisted by various services such as Norton SafeWeb.
When someone downloads a file from you, the browser will say downloading from dl.myowndomain.com instead of dl.dropbox.com. This makes it look much more professional if you’re using Dropbox to host files.
Load in Frame
You can have the Dropbox page load in a frame on your own website domain. Simply add this line of code to your site replacing the URL part with your Dropbox public link.
<iframe src="http://dl.dropbox.com/u/useridhere/website/index.html" width="100%" height="100%"> <p><a href="http://dl.dropbox.com/u/useridhere/website/index.html">Your browser does not support frames. Please click here instead.</a></p> </iframe>

The same webpage as above but loaded through a frame. Notice the URL.
The limitation to this method is that if its being used to serve multiple webpages, the URL bar will always show the same URL.
Of course, you can always just have a URL redirect to a Dropbox link, but that would still show the original Dropbox URL.
Have another method for using a custom domain with Dropbox public links or another tip for us about using Dropbox? Share with us in the comments.
Pingback: 换图床不如换思路,Dropbox绑定域名继续外链 | 亦斯