Setting up a redirect

Overview

All Maestro applications come with a built-in tool to quickly enable commonly-used redirects. This includes:

What you’ll need

Before you start, please check you have the following:

Accessing redirect settings

  1. Open the application overview page from your Dashboard
  2. Click on Network Settings in the Application panel on the right of the screen
  3. Click on the Redirects tab at the top of the main panel

You can now use this page to set (or remove) redirects.

Using Maintenance Mode

When you have to make manual changes to your application or push out a breaking change, you may not be able to guarantee that your application will be able to serve content or act correctly.

During such times, you can set your application into maintenance mode, which serves a static holding page (either a default Cloud 66 page, or your own) for the duration of your maintenance work.

To enable maintenance mode:

Remember to give your application a few minutes to enable this change. Then open your app in a browser. Instead of the normal visit count, you should see the default Cloud 66 maintenance page.

You can still safely redeploy your application while maintenance mode is enabled - the maintenance page will be served until you turn off maintenance mode.

Add a custom maintenance page

To add your own maintenance page, place your HTML file in the following path of your code repository:

/.cloud66/maintenance.html

Redirect HTTP to HTTPS

If you have added SSL certificates to an application, you can redirect all traffic to use HTTPS instead of HTTP.

This works by reconfiguring your Nginx configuration, so any visitor that arrives at port 80 and HTTP will receive a permanent HTTP redirect (301) to the same address on HTTPS.

To enable this:

Remember to give your application a few minutes to enable this change. Then open your app in a browser and ensure the URL starts with http. The URL should immediately redirect to https.

Bear in mind that if you haven’t set up SSL certificates on your application that your browser will probably refuse to open the page as it appears to be insecure.

WWW or non-WWW

Some sites serve traffic on www.domain.com, while others use the bare domain.com.

By default, your servers will serve traffic for any DNS record pointing to their address. This setting allows your to redirect visits to www.domain.com to domain.com, or vice-versa. (You can also choose to not redirect at all)

This works by changing your Nginx configuration to permanently redirect (HTTP 301) visitors to the desired address.

To enable this, choose the required option under WWW or No-WWW in your URL and click Apply Redirects. Remember to give your application a few minutes to enable this change.