Redirects
Use redirects to redirect pages to another, internal or external, page.
Use redirects to redirect pages to another, internal or external, page.
Redirects consist of 3 parts, the page that is being redirected, the page to which the redirect should go and wether or not the redirect is permanent. A redirect could look like this:
/discounts -> /discounts/january-2017 302
eresults.nl/summer
, this would be /summer
.https://eresults.nl/random-page
).301
Will indicate that this is a permanent redirect, search engines will remove the page you're redirecting from and replace it with the page you are redirecting to (the second part only applies when you're referring to a page on your own website).302
This is a temporary redirect. You can use this to redirect a page to the latest edition of your weekly blog or to point to the latest campaign page.You can test a redirect by visiting the page you're redirecting from in your browser, if you see the new page everything your redirect is set up properly. Should you get any other result, here's a list of things that might be going wrong:
/discounts -> /discounts/january-2017301
Sometimes you want to redirect multiple, similar, paths. That is where variables come in. With variables we can mark a section of the path as being variable, to make it match multiple paths. Here is how you use variables:
/news/[message] -> /blog/[message] 301
New is that we've placed a piece of the path between straight brackets, this is the named variable. Here we used a variable named message to redirect all pages below /news
to a path with the same name under /blog
. Eg. /news/press
would become /blog/press
.
The name of the variable is something you can decide, so pick something you think is easy to understand. Variable names can only use letters and numbers, so no spaces and other punctuation. You can use multiple variables if needed.
Do you want to redirect multiple pages to the same page, then you can leave out the variable on the to path, like this:
/service/[service] -> /all-services 301
Here are some practical real world examples you can easily copy for your own redirects.
/discounts -> /discounts/january-2017301
A simple redirect from a to b, just make sure you don't have an active page with the same from path.
/partner-a -> https://partner-a.com 301
Redirect a page on your website to another website.
/news/[message] -> /blog/[message] 301
Redirect all pages under /news to /blog. A use case could be when you've renamed a page and want to redirect all subpages to their new path. Make sure the variable name is the same on both sides.
/employee/[employee] -> /employees 301
Redirect all pages under /employee to the /employees page. Use this when you've replaced multiple pages by a single overview.