serverless-domain-manager icon indicating copy to clipboard operation
serverless-domain-manager copied to clipboard

Add www redirection to non-www url

Open OleksandrKryvobok opened this issue 10 months ago • 0 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

OleksandrKryvobok avatar Mar 29 '24 13:03 OleksandrKryvobok