• Hi all: I’ve recently discovered that using /%postname%/ only for permalinks on posts is not scalable. My site has currently a small number of posts (25) and about 35 pages. Likely I will eventually have 100s of posts, so before it’s too late it seems I need to change Permalinks.

    Question 1: shelf life with %postname%-%post_id%
    If I now use %postname%-%post_id%, will the URL have a shorter shelf life on search engines? Concern is whether Google and others will see this as a “news post” and only keep it indexed for a few weeks.

    Question 2: how to re-direct searches until engines re-index the new permalinks?
    I believe I need to make changes to the htaccess file and add a re-direct, from /%postname%/ to /%postname%-%post_id%. Any idea how to do this? First time trying to do such a thing. The re-direct will need to only apply to posts, not pages.

    Thanks in advance
    Nick

Viewing 5 replies - 1 through 5 (of 5 total)
  • 1. I think you are better off putting the date in front of the postname than post id. Post ID is just a number – it doesn’t contain any information about the post. Posts aren’t indexed by their newness – they are either indexed or they are not. It’s placement in the index depends on a variety of factors such as page rank, keywords, links to the page …

    2. You could use the Permalink Redirect Plugin

    http://scott.yang.id.au/code/permalink-redirect/

    Thread Starter pro102

    (@pro102)

    Thanks KW. Regarding the redirect (question 2), I’ll take a look at the plugins but since it would be a structural redirect that applies to all post URLs, I’m thinking there must be a one-line code I could add to htaccess? I just don’t know how to generate that line of code.

    Nick

    Yeah – I always struggle when I do them which is why I didn’t give the htaccess line you needed. Maybe someone will come along who understands it better than I do.

    Thread Starter pro102

    (@pro102)

    I’d be happy either a line of code to try, or if there is a site/page somewhere on the net (or in the wordpress docs) that teaches how to build 301 redirects from /%postname%/ to /%postname%-%post_id%, that would work too.

    Cheers
    Nick

    Thread Starter pro102

    (@pro102)

    Update: after checking with Apache developers, they claim that there is no way for htaccess to look up postid, therefore what needs to be done is adding code in php script.

    anyone knows the file which needs to be edited in wordpress, to make a 301 redirect through PHP?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Need to change Permalink without breaking indexing’ is closed to new replies.