• Hi,

    I just hired someone to handle some work on our sites, including changing our url structure from
    /%date%/%postname%.html to /%postname%. I wasn’t certain as to how such redirects would turn out so to be safe, I hired a pro.

    I thought that WP would automatically handle the redirects but this company told me that WP only handled redirecting individual posts not a “mass” of them & that I should use a plugin. This made no sense to me as when the permalink structure is changed via Admim-Settings-Permalinks, all post urls are changed.

    So, do I need a redirect plugin or will WP handle this automatically for all posts? Does WP write the redirect to the .htaccess file?

    Thanks!!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Your ‘Pro’ is right. You need to 301 redirect your old posts. Something like this should do. I’m not vouching for this plugin though, since I’ve never used it.

    Thread Starter AA

    (@alan-a)

    Really?

    I have been told otherwise & actually tried this out on another site last night.

    I changed the permalink structure via the WP Admin panel-Settings-Permalinks page & ALL of the post redirected from the old permalinks/urls to the new ones.

    Considering my new experiment, & what another WP pro has told me, your answer surprises me. Hmmm…Any thoughts? ??

    WP will maintain the integrity of all links within the site where possible. But if an external site has linked to you using the old permalink structure ending with .html, a visitor clicking that link will get your 404 page. Ditto if you’ve linked to one of your own posts within the content of another post.

    Try one of your old urls and see what happens.

    Thread Starter AA

    (@alan-a)

    Thanks esmi!

    Now I am really confused ??

    “But if an external site has linked to you using the old permalink structure ending with .html, a visitor clicking that link will get your 404 page. Ditto if you’ve linked to one of your own posts within the content of another post.”

    Well, then WP would not actually be performing 301’s. However, as I mentioned, I did change the permalink structure on one of my sites to try this supposed automatic redirect by WP & it worked, w/o a redirect plugin. I of course checked the old url’s & they in fact did redirect to the new ones. Keep in mind though that the old permalink structure on this site used the standard WP permalink structure, not one including dates & .html, like my other sits. Hmmm…

    WP does not perform any 301 redirects. It re-writes page/post requests (via an .htaccess file) as they come into the site so visitors see the correct post or page. It cannot deal with any different link structure that you had, say, last week. Only with the structure that you have now.

    Keep in mind though that the old permalink structure on this site used the standard WP permalink structure

    That will have made a big difference. Even when you have “pretty” permalinks, internally WP still uses the ugly old defaults. It just applies a nice cosmetic front to them. So moving from ugly to pretty permalinks shouldn’t break any inbound links but changing from pretty to ugly would.

    Ditto changing from pretty type-A to pretty type-B.

    Does that help?

    Thread Starter AA

    (@alan-a)

    That helps a lot! Although I checked the .htaccess file & didn’t notice any rewrites…maybe I missed it.

    I will now of course need to change my permalinks from pretty 1 to pretty 2 just to confirm this ??

    But…what about the in post feature that allows for url/permalink alterations? Changing the permalink here for individual posts will redirect accordingly, correct?

    Thanks! This is good learning ??

    esmi

    (@esmi)

    Changing the permalink here for individual posts will redirect accordingly, correct?

    Again, all internal links generated by WP will be updated accordingly. Any inbound external links or links within post/page content may break.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Automatically Redirecting Altered Permalinks’ is closed to new replies.