amplify-education / serverless-domain-manager

Serverless plugin for managing custom domains with API Gateways.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add www redirection to non-www url

OleksandrKryvobok opened this issue · comments

Support Question

Question
Can you help, please? How I can create a redirect from www.example.com to example.com?
Because if I add a CNAME record in r53 that give me an error like this:

This site can’t provide a secure connection www.example.com uses an unsupported protocol.
ERR_SSL_VERSION_OR_CIPHER_MISMATCH

Domain Manager Configuration


plugins:
  - serverless-dotenv-plugin
  - serverless-prune-plugin
  - serverless-domain-manager
#  - serverless-plugin-warmup

custom:
  prune:
    automatic: true
    number: 2
  domains:
    prod: example.com
    dev: dev.example.com
  customDomain:
    domainName: ${self:custom.domains.${opt:stage, 'dev'}}
    basePath: ""
    stage: ${opt:stage, 'dev'}
    certificateName: 'example.com'
    createRoute53Record: true
    endpointType: 'edge'
    securityPolicy: tls_1_2