courseseller19 Posted July 6 Posted July 6 Hi All, I am looking for a way to standardize my 301 redirects so that a manual listing of every individual link is not needed. Specifically, I want wildcards or custom code so that versions of my URL slugs including any (or all) upper-case letters would redirect to the all lower-case versions used by Squarespace. I have heard that eliminating issues with upper-case and lower-case letters helps with SEO. An example of dynamic code is shown within the below, but I am not sure if this kind of code is supported within Squarespace. https://organicdigital.co/blog/how-to-convert-and-redirect-uppercase-url-characters-to-lowercase/ Sample Code Below from the Above Link: RewriteEngine On RewriteCond %{REQUEST_URI} [A-Z] RewriteRule ^/?(.*)$ /${lowercase:$1} [R=301,L] One post I found made it sound like this was not possible on Squarespace unfortunately, but I wanted to see if this was still the case. Link provided below. https://stackoverflow.com/questions/66532690/how-do-i-reduce-the-number-of-301-redirect-entries-using-wildcards-and-variables Thanks!
Shadmon Posted July 6 Posted July 6 Your sample code won't work. You can simply change the URL slug from uppercase to lowercase manually. Please check the instructions here: https://support.squarespace.com/hc/en-us/articles/205814578-URL-slugs
courseseller19 Posted July 6 Author Posted July 6 Thanks Shadmon. I had that same page bookmarked and was aware of the manual approach, but I was hoping for a more dynamic approach to avoid having to maintain a manual list. Even for a site that only has a few pages, going manual can result in large number of mappings (especially if you are looking to extra safe and cover every possible iteration of capitalization). For example, https://www.example.com/about https://www.example.com/About https://www.example.com/ABOUT https://www.example.com/aBout https://www.example.com/abOut https://www.example.com/aboUt https://www.example.com/abouT
Solution Shadmon Posted July 6 Solution Posted July 6 Unfortunately, there is no dynamic approach. I suggest you use this tool to lowercase your URL. It will take you a few seconds and you will be safe. https://convertcase.net/ let me know if it helps!
courseseller19 Posted July 7 Author Posted July 7 Thank you! That link helps. I also put together a file in Excel using text functions (LEFT, MID, RIGHT, etc.) to help automate this process somewhat. Maybe allowing for a dynamic/automated approach is something Squarespace could consider for a future release.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment