-
Notifications
You must be signed in to change notification settings - Fork 333
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
We should document how to use a redirect to serve a site on both www.example.com and example.com.
One way of redirecting one domain to another is deploying your origin website to the www domain, and setting up another project associated with the non-www domain which serves a simple redirection using JavaScript code as follows:
Deno.serve(() => Response.redirect("https://www.example.com/", 301));
This code will ensure that visitors to the non-www domain get redirected to the www domain with HTTP status code 301 (permanent redirect).
mohijalili
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation