Automatic 301 redirects when changing page name

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
4/11/2022 9:58:54 AM
Gravatar
Total Posts 221

Automatic 301 redirects when changing page name

Just bringing up a subject for thoughts and opinion.

Currently, when you change a page name an automatic 301 redirect is created. I see how that could be useful in some cases but I wonder if it should be the default or if it should be an optional check when renaming? My opinion is that it should be optional for these reasons.

1) When building a site sometimes for SEO reasons page URLs are changed during the build process. This creates 301s that don't serve a purpose.

2) Typos happen. Again, creates 301s without benefit.

3) Sometimes I structure page URLs and then have to change them at some point to move a section and restructure URLs. Lots of 301s I don't need.

4) With search engines reindexing so often on many sites I wouldn't always want or need a 301.

I feel like all these 301s may not be needed. They also take up page URLs that you might want to use in the future and then can't use because there's a 301 out there which can cause issues and confusion for users.

I wonder if when renaming a page there's a little checkbox that asks if you'd like a redirect created? I'd default it to unchecked.

Or possibly even a user.config setting to turn off 301 auto-creation altogether. I'd probably choose this and just create 301s manually when I have that need.

 

Wordy post, worth a discussion I hope.

4/19/2022 10:03:03 AM
Gravatar
Total Posts 2253

Re: Automatic 301 redirects when changing page name

Hey Eric,

I've often thought about putting a checkbox on the page edit to allow the editor to disable the 301 redirect creation. I've also considered a toggle for an admin to temporarily disable 301 redirects. Both just haven't made it past thoughts. We'll add it to the to-do list though.

There are some things you can do while you're building sites to make this a bit easier.

Add <add key="DisableCacheFor301Redirects" value="true" /> to the user.config. This will prevent the 301s from being cached. Once you're ready to launch the site, you can disable this and clear the 301 redirects that have been created by running the following script against your DB (mssql, other versions would be similar). 

DELETE FROM mp_RedirectList WHERE SiteID = 1;

You could remove the WHERE SiteID = 1 if you don't have other sites on the same install.

You can also remove 301 redirects individually by going to Administration > Advanced Settings > 301 Redirect Manager. 

Thanks,
Joe

4/19/2022 11:17:52 AM
Gravatar
Total Posts 221

Re: Automatic 301 redirects when changing page name

Good info, thanks Joe!

You must sign in to post in the forums. This thread is closed to new posts.