SEO redirects play a crucial role in maintaining website health and search engine optimization. They ensure that users and search engines are directed to the correct URLs, preventing issues like broken links and duplicate content. Enterprise Commerce offers a robust and scalable SEO redirect solution capable of handling thousands of redirects with ease. This solution utilizes Bloom filters, a probabilistic data structure, to optimize data lookup performance. As described in the Next.js documentation, Bloom filters efficiently determine whether a specific URL requires redirection without the need to iterate through the entire list of redirects. This significantly improves performance and ensures fast response times even with a large number of redirects in place. By implementing SEO redirects you:Documentation Index
Fetch the complete documentation index at: https://docs.commerce.blazity.com/llms.txt
Use this file to discover all available pages before exploring further.
- Maintain SEO value: Redirect outdated or deleted pages to relevant content, preventing loss of search engine ranking and traffic.
- Improve user experience: Ensure users land on the correct page, avoiding frustration and confusion.
- Boost website performance: Efficiently handle redirects without compromising website speed.
Configuration
We store redirect rules in a JSON file located at[starter]/lib/redirects/redirects.json.
This file follows a simple structure, where each key represents the old URL path, and the corresponding value is an object containing the destination URL and a permanent flag indicating whether the redirect is permanent (301) or temporary (307).
Here’s an example of the redirects.json file:
[starter]/lib/redirects/redirects.json
redirects.json file according to your needs. Remember to maintain the correct JSON structure.
Important: After making changes to the redirects.json file, you must execute the following command to update the generated Bloom filters: