Brighella URL-masking redirect

by weppos



Brighella is a simple URL-masking redirect service built on Go.

Build Status

It is designed to be deployed on a PaaS service such as Heroku, and it requires zero configuration. The redirect target is fetched from a specific DNS record attached to the requested host.


Brighella is a comic, masked character from the Commedia dell'arte. It's also an Italian carnival mask.

How it works

The redirect is performed using an iframe. The target URL is rendered in an iframe, so that the URL will continue to match your URL in the browser, but the user will effectively navigate in the target URL.

This is known as iframe masking, masked redirect, masked forwarding or iframe redirect.

Please note that the target site may explicitly forbid the displaying of the content within an iframe (using the X-Frame-Options header). In that case, there is nothing you can do because that's what the owner of the target URL wants.


Let's assume you want to redirect to What you have to do is:

  • Deploy the application
  • Make sure the app is properly configured to respond to the domain (for Heroku use the domains:add command)
  • Make sure the DNS record for points to the server where the app is deployed
  • Configure a DNS TXT record called with the content

That's it. The app will automatically try to load the target of the redirect from the DNS record.

You can configure as many domains you want for a single instance of the application, as long as each domain has a corresponding _frame record.

Important: that the record name MUST match the domain name, prefixed with _frame. Here's some examples of expected configurations: requires requires requires

If you need a reliable DNS provider to manage your domain, check out DNSimple. FYI, this project was born in response to the various customers at DNSimple that asked us information about how to configure an URL-masked redirect.


Copyright (c) 2016-2020 Simone Carletti. This is Free Software distributed under the MIT license.