Redirect project.glitch.me domain to custom domain

Is there a way to automatically redirect a glitch domain that has custom domains enabled (e.g. my-project.glitch.me) to the custom domain (e.g. my-custom-domain.com) with express? :thinking:

Connect the domain. It is easy.

app.use(function(req, res) {
     res.redirect("https://example.com");
});

Replace example.com with your domain.

Ohh, if that what you meant, that is right. I thought you were talking about connecting a custom domain.

1 Like