Dub Link Cloaking with Security Headers

Here's an example of how you can leverage security headers to cloak your links on Dub while also making sure your links are secure.

To do that, you will need to whitelabel your Dub short domain by setting the following response headers on your site (the destination URL that you want to cloak):

Content-Security-Policy: frame-ancestors 'self' [shortdomain.com]

This will ensure that your site cannot be embedded in third-party sites but can still be cloaked by your Dub short domain.

Learn more: