Help
Redirects Configuration
Redirects Configuration
The ability to configure redirects is an essential tool for managing website transitions, ensuring a good user experience and preserving your site’s authority in search engines. Properly configuring redirects prevents users from encountering 404 errors (page not found) and ensures that traffic is directed to the right pages. This guide explains the importance of redirects and provides a detailed step-by-step guide to setting them up in StudioCMS .Importance of Redirects
-
Traffic Preservation
- By redirecting old URLs to new ones, you ensure that users find the content they are looking for, even if the site structure has changed.
-
SEO and Domain Authority
- Redirects help transfer authority and relevance from the old page to the new one, preventing losses in Google rankings.
-
User Experience
- Avoiding 404 errors or non-existent pages improves navigation and reinforces user confidence in the website.
-
Support for Rebranding or Domain Change
- If your site changes domains or undergoes restructuring, redirecting URLs is essential to maintain consistency and minimize negative impacts.
Types of Redirects in StudioCMS
In StudioCMS , redirects are configured based on regular expressions (RegEx), allowing flexibility and precision in URL management.
Common Redirection Patterns
-
Without trailing slash:
^escolar/organizacao/classificadores-e-separadores/classificador-durable-2579-a4-cinza-plastico$
- It only works for URLs without a trailing slash, like:
escolar/organizacao/classificadores-e-separadores/classificador-durable-2579-a4-cinza-plastico
-
With trailing slash:
^escolar/organizacao/classificadores-e-separadores/classificador-durable-2579-a4-cinza-plastico/$
- It only works for URLs with a trailing slash, like:
escolar/organizacao/classificadores-e-separadores/classificador-durable-2579-a4-cinza-plastico/
-
Accepts both cases (with and without slash):
^escolar/organizacao/classificadores-e-separadores/classificador-durable-2579-a4-cinza-plastico/?$
- It works for URLs like:
escolar/organizacao/classificadores-e-separadores/classificador-durable-2579-a4-cinza-plastico
escolar/organizacao/classificadores-e-separadores/classificador-durable-2579-a4-cinza-plastico/
Conclusion:
For greater flexibility and to avoid problems, always use the /?$
pattern at the end of the source URL. This way, the redirect will work for both URLs with and without a trailing slash.
Step by Step Guide to Configuring Redirects in StudioCMS
-
Access the redirects area:
- Navigate to the side menu in StudioCMS and select the Redirect Rules section.
-
Add a new redirect:
- Click on the “+” button at the top right of the screen.
-
Configure the source URL:
- Enter the old URL (source) that needs to be redirected.
- Use the more inclusive format (
/?$
) to include both trailing slash and trailing non-slash URLs.
-
Set the target URL:
- In the “Destination URL” field, enter the new URL where the user will be redirected.
- Set Code and Priority:
- In the url code field, always put: 301
- In the priority field, always put: 1
-
Save and test:
- Click “Save”.
- Test the redirect in your browser to make sure it works correctly.