Skip to content

Commit 8acfe09

Browse files
author
Matthew Sweeney
authored
Replace Redirects Guide (#1424)
* replace redirects guide * update routes documentation
1 parent 020addc commit 8acfe09

File tree

6 files changed

+20
-101
lines changed

6 files changed

+20
-101
lines changed

components/references-mdx/configuration/routes/routes.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,7 @@ For example, you can use this property in combination with [the `headers` proper
180180
property can also point to non-Now hosted URLs.
181181
</Note>
182182

183-
Read more about redirecting your `www.` subdomain to your root domain:
184-
185-
<Card title="www. Redirect Guide" href="/guides/redirect-from-www">
186-
Create a redirect from the www. subdomain to your root domain.
187-
</Card>
183+
Read more about redirecting your `www.` subdomain to your root domain in the [custom domains documentation](/docs/v2/custom-domains/#redirecting-domains).
188184

189185
## methods
190186

lib/data/guides.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -329,15 +329,6 @@
329329
"editUrl": "pages/guides/prevent-uploading-sourcepaths-with-nowignore.mdx",
330330
"lastEdited": "2019-10-11T23:41:55.000Z"
331331
},
332-
{
333-
"title": "Redirect from www. To Your Root Domain with ZEIT Now",
334-
"description": "Redirect your visitors to your root domain from the www subdomain when deploying with ZEIT Now.",
335-
"published": "2019-01-23T03:00:00.860Z",
336-
"authors": ["timothy"],
337-
"url": "/guides/redirect-from-www",
338-
"editUrl": "pages/guides/redirect-from-www.mdx",
339-
"lastEdited": "2019-10-22T21:51:28.000Z"
340-
},
341332
{
342333
"title": "Setup a GoDaddy Domain with ZEIT Now",
343334
"description": "Use your GoDaddy registered domain for your ZEIT Now deployments.",

pages/docs/v2/custom-domains.mdx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ import Caption from '~/components/text/caption'
44
import Note from '~/components/text/note'
55
import Card from '~/components/card'
66
import { Image } from '~/components/media'
7+
import { InlineCode } from '~/components/text/code'
78

89
export const meta = {
910
title: 'Custom Domains',
1011
description: 'How to add and use a custom domain with your project.',
1112
editUrl: 'pages/docs/v2/custom-domains.mdx',
12-
lastEdited: '2019-10-17T18:48:32.000Z'
13+
lastEdited: '2019-10-30T10:31:11.000Z'
1314
}
1415

1516
By default, all deployments are assigned a `.now.sh` prefixed domain.
@@ -146,6 +147,20 @@ When a custom domain is assigned as a production domain to a project with a [Now
146147

147148
Reverts take effect immediately, assigning the custom domain to the deployment made prior to the point the revert is effective from.
148149

150+
## Redirecting Domains
151+
152+
You can add domain redirects from the **Domains** tab when more than one domain is present for the project. This provides a way to, for example, redirect a `www` subdomain to an apex domain but can be used in a variety of ways.
153+
154+
To add a redirect, select the domain you want to redirect to from the **Redirect to** dropdown:
155+
156+
<Image
157+
src={`${process.env.ASSETS}/docs/custom-domains/redirecting-domains.png`}
158+
width={1350 / 2}
159+
height={370 / 2}
160+
shadow
161+
/>
162+
<Caption>A <b>domain redirect</b> that redirects requests made to <InlineCode>www.zeit.rocks</InlineCode> to <InlineCode>zeit.rocks</InlineCode>.</Caption>
163+
149164
## Removing a Domain
150165

151166
To remove a domain that is assigned to your ZEIT account or team, navigate to the **Domains** tab from the Project Overview and click the **Remove** button for the domain you want to remove:

pages/guides/redirect-from-www.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import redirect from '~/lib/redirect'
2+
3+
export default redirect('/docs/v2/custom-domains/#redirecting-domains')

pages/guides/redirect-from-www.mdx

Lines changed: 0 additions & 86 deletions
This file was deleted.
Loading

0 commit comments

Comments
 (0)