Notice: There is no legacy documentation available for this item, so you are seeing the current documentation.
Did you know that you can create redirects in All in One SEO Pro that will ignore whether there’s a trailing slash at the end of the URL?
This is especially useful in catching visitors that may go to your site but leave off the trailing slash.
For example, a visitor may type in https://mydomain.com/blog/ to reach your blog. This URL has the trailing slash at the end of the URL.
However, visitors may also type in https://mydomain.com/blog to reach your blog. This URL doesn’t have a trailing slash at the end of the URL.
When you create a redirect, you have the option to redirect the URL without the trailing slash, or the URL with the trailing slash, or both.
Ignore Trailing Slash for a Single Redirect
Here’s how to ignore the trailing slash in a single redirect:
To get started, go to Redirects in the All in One SEO menu.
You’ll see the Redirects screen and at the top will be the Add New Redirection form.
In the Source URL field, enter the URL you want to redirect from. The URL must be a relative URL, i.e. don’t include the https://mydomain.com part of your URL. You can add the trailing slash or leave it off.
Now click the settings icon on the right side of the Source URL field.
You’ll see three checkboxes, one is for Ignore Slash. Check this box and the trailing slash will be ignored for this redirect only.
In the Target URL field, enter the URL you want to redirect to. The URL can be either a relative URL or an absolute URL.
You can also start typing the title of any post, page or other content on your site, or the slug or ID in the Target URL field and the matching content will be displayed. Click on the post or page you want to select as your target.
In the Redirect Type drop down, select the type of redirect you want. The two most common are:
- 301 Moved Permanently: Use this if you want to permanently redirect the old URL because the content has been deleted or moved.
- 307 Temporary Redirect: Use this if you only want to temporarily redirect the old URL
Click the Add Redirects button to add your redirects.
The redirects will be shown in the Redirects table.
Ignore Trailing Slash for all Redirects
If you want to ignore the trailing slash for all redirects that you create, then start by going to Redirects in the All in One SEO menu and then click on the Settings tab.
Scroll down until you see the Redirect Defaults section and you’ll see a setting for Ignore Slash.
Click the toggle to enable this setting. Now all redirects will ignore the trailing slash in the source URL.
Check out more documentation on our Redirection Manager here.