How to redirect a post or page
Please keep the following in mind when creating a redirect, as most problems with redirects are due to a faulty input.
The ‘Old URLs’ of redirects are relative
The redirect functionality has been created to solve problems with redirects in your WordPress site. To do this, we use relative input for redirecting. This means that you can enter -for example- /test123/ to be redirected to any URL (e.g. http://yourtarget.com/link).
This would result in the absolute URL http://example.com/test123/ being redirected to http://yourtarget.com/link, where http://example.com is the address you can find under Settings → General → Site Address in your WordPress admin.
So what does it look like in the WordPress SEO Premium plugin?
In the above example you see the following:
- A redirect from http://example.com/redirect-me-to-homepage/ to http://example.com
- A redirect from http://example.com/old-slug/ to http://example.com/my-post-is-here-now
- A redirect from http://example.com/conf to https://yoast.com/conference
Redirects are relative!
Following from the fact that we only handle relative input we cannot redirect you from the one (sub)domain to another. So if your blog is installed on http://blog.example.com, you cannot redirect your visitors from:
To redirect people from those URLs, you’d need a WordPress install with WordPress SEO Premium activated on those URLs.