sladg / nextjs-lambda

Lambda deployments for Nextjs12 & Nextjs13 (standalone). Easy CLI commands to get your standalone Next output to run in AWS Lambda (not @Edge)! Uses CDK in behind and produces code zips importable to Terraform, Serverless, Azure, etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow for use of `www`

sladg opened this issue · comments

commented

Generally speaking, using www has almost no down-sights compared to using root domain (apex), which has technical limitations such as CNAMEs.

After reading through RFCs on this topic, the preferred way is to have apex redirect to www and use www everywhere in case other subdomain is used.

Currently, it's not possible to easily follow this behaviour. You can specify www as subdomain, however, there is no mechanism to deal with redirection from apex out-of-box.

commented

Implemented via --redirectFromApex. It will create HttpsRedirect from root (aka. from hosted zone) to provided address (dns prefix).