Link Search Menu Expand Document



The Provose https_redirects module is mapping of DNS names and settings on how to select redirects for them.

What this module does

As the name suggests, this module can create HTTP 301 permanent redirects or HTTP 302 temporary redirects from all paths under a domain name to another. This module does not create DNS CNAME or other types of redirects.

You can use this module to redirect HTTP(S) traffic to anywhere on the Internet, but your AWS account must own the domain name for the source of the redirection.

What this module does NOT do

This module redirects traffic with the public-facing Application Load Balancer (ALB), and currently cannot be used to route HTTP(S) traffic within the Virtual Private Cloud (VPC) that Provose sets up.

How to configure this module

There are two forwarding types that govern how the redirects work.

  • "DOMAIN_NAME" – This takes all HTTP(S) URLs under your source DNS name and forwards it to the corresponding location in the destination DNS name. For example, if your source name is and you want to forward requests to, setting your forwarding_type to "DOMAIN_NAME" will send the URL "" to "".

  • "EXACT_URL" – This takes HTTP(S) URLs from the source and sends them to the exact same URL at the destination. For example, if your source name is "" and you want to forward requests to "", setting your forwarding_type to "EXACT_URL" will send ""to "". You can also set your destination to something like "" and all source URLs will go there.


module "myproject" {
  source = ""
  provose_config = {
    authentication = {
      aws = {
        region = "us-east-1"
    name                 = "myproject"
    internal_root_domain = ""
    internal_subdomain   = "production"
  https_redirects = {
    "" = {
      status_code     = 302
      destination     = ""
      forwarding_type = "DOMAIN_NAME"
    "" : {
      destination     = ""
      forwarding_type = "EXACT_URL"


  • destinationRequired. This is the destination URL to send redirects to, like You should always include the protocol (like "http" or “https"). This can be an exact URL if the forwarding_type is "EXACT_URL", or a generic domain name if the forwarding_type is "DOMAIN_NAME".

  • forwarding_typeOptional. This specifies whether all possible sources are sent to corresponding destination URLs ("DOMAIN_NAME") or whether to send them to the exact same destination URL ("EXACT_URL").

  • status_codeOptional. This is the HTTP status code to use in the redirect. By default this is 301 making the redirect “permanent” in the eyes of web browsers, search engines, and other HTTP clients. You can set this to 302 to tell HTTP clients that the redirect is “temporary.”