Welcome to WebmasterWorld Guest from 3.85.245.126

Forum Moderators: rogerd & travelin cat

Changing URL of a WP page while retaining content

     
5:56 pm on Aug 16, 2019 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:Jan 8, 2019
posts: 93
votes: 2


I'll likely be changing the URLs of tons of articles in order to establish hierarchical linking structure.

They're all flat at the moment.

I'm not 100% clear on implementation.

I'm assuming it goes:

You have an existing article. It gets traffic and has backlinks.

You want to change the URL and keep the same content (or at least some of it).

So you copy/paste content of old article into new article, then publish new article with new URL.

Then you need to redirect the old article to the new one.

Does this sound about right?
7:08 pm on Aug 16, 2019 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:15903
votes: 877


Does this sound about right?
Why do you need to copy and paste anything? You’re simply changing the URL of an existing file.
7:14 pm on Aug 16, 2019 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:Jan 8, 2019
posts: 93
votes: 2


@lucy24

"You’re simply changing the URL of an existing file."

That's what I thought at first! But when I tested, I changed the URL address permalink, which created a 404 for the old URL. So the URL google has indexed will return a 404 to users. I'm assuming that will cause me to lose my current rankings.

When I tried changing the URL by setting it to redirect to the new URL, it also caused a 404 because the new URL doesn't exist as a page yet.

So if I want to keep the same rankings of old page but change the URL, it seems I need to copy the content, paste it into a new page that will have the new URL, then post. And redirect old url to this new one I created. Never done that before and I'm worried it'll kill my rankings.
11:39 am on Aug 17, 2019 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Sept 7, 2006
posts: 1136
votes: 140


You're effectively changing a filename and/or filepath (URL). As long as the new filename or filepath (URL) exists on the server it should return a 200 either directly or through a 301 from the old filename/filepath (URL).

Any FTP software should enable you to rename, create folders and move pages on the server if you can't or don't want to do it locally. Then add a 301 from oldname/oldpath to newname/newpath to your .htaccess file.
6:15 pm on Aug 17, 2019 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 29, 2005
posts:10481
votes: 1100


Define "tons" of articles.

Hierachal is a logical way to go ... but there are ways of implementing.

1. Just add it in, changing nothing else, and code for it from this point forward.
2. Made the change and use redirect to new content.

#1. has the advantage of allowing the site to continue as usual, growing into the new structure, no redirects required.

#2. has the pain of ensuring that all old urls are addressed to new urls, and if "tons" is more than 25-50 redirects there's all kinds of foobar possible.

Observation: If you redirect by folders, you already have a hierarchy, so what is the need for the change? Keyword inserts into urls? This does not work as well as it did back in 2010, and most CMS programs are even worse in URL building ... so the SEs don't pay that much attention.

Just curious!
6:25 pm on Aug 19, 2019 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:Jan 8, 2019
posts: 93
votes: 2


Hi @tangor!

We're talking 16 redirects so far, and only maybe 6 of those pages are currently ranking well and bringing in money.

"Observation: If you redirect by folders, you already have a hierarchy, so what is the need for the change?"

Good question! We have some lawyer directory pages under /blogs/ and blogs under /legal-areas/, for one thing, so there's some chaos there. My OCD wants everything clean and organized. (And SEOs like Bruce Clay say Google wants a clear hierarchy.

Also we're building out geo pages by state, city, practice area. So I want a silo URL structure to keep that all organized. I'm fitting some existing pages into that new geo structure, which would require a redirect if I want the URL to fit into a silo structure like /legal-area/california/los-angeles.

The actual benefits of a hierarchical URL structure as I see it:

1) Segmented analytics i.e. analyze at the folder level not just page level.

2) Desktop users can edit the URL to navigate backward (although they can also just press the back button).

I understanding interlinking and click depth are more important than a hierarchical structure (I'm baking both into my strategy), so I'm totally open to no redirects.

My two options are:

1) Redirect any kept pages to the new siloed URL
2) Retain URLs of kept pages even though they won’t fit into the URL structure of all other pages

Which would you go with in my scenario?
9:52 pm on Aug 19, 2019 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 29, 2005
posts:10481
votes: 1100


With a number that small just do the redirects. :)
10:24 pm on Aug 19, 2019 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:Jan 8, 2019
posts: 93
votes: 2


@tangor

Even if some of them are our most trafficked pages? Will I lose my rankings.
11:13 pm on Aug 19, 2019 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 29, 2005
posts:10481
votes: 1100


A proper redirect should have no impact on ranking.
11:29 pm on Aug 19, 2019 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:Jan 8, 2019
posts: 93
votes: 2


@tangor

Ok! Here's where I'm confused. Is a proper redirect 1) Create a new page in Wordpress with the new URL 2) copy paste old content into said new page 3) publish new page 4) redirect old URL to new page?

Would that process ensure no ranking is lost?

Just checking because Wilburforce mentioned this: "rename, create folders and move pages on the server if you can't or don't want to do it locally. Then add a 301 from oldname/oldpath to newname/newpath to your .htaccess file." I would need a Dev for this I think, and we're in the process of hiring. If this is the proper way to redirect, I need to make sure the Dev can do so before I hire.

Thanks!
12:53 am on Aug 20, 2019 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:15903
votes: 877


The search engine doesn't care how you created the physical page. All it cares about is:

Content was formerly found at example.com/A
Content is now found at example.com/B
Therefore, requests for example.com/A should be redirected in a single step to example.com/B.
3:01 am on Aug 20, 2019 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 29, 2005
posts:10481
votes: 1100


@lucy24 ... Yes!
3:28 am on Aug 20, 2019 (gmt 0)

Administrator from US 

WebmasterWorld Administrator not2easy is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 27, 2006
posts:4530
votes: 350


I do not think that Wilburforce's suggestion was meant to be used in a WordPress scenario. It reads as if it was intended for physical static pages:
Any FTP software should enable you to rename, create folders and move pages on the server if you can't or don't want to do it locally. Then add a 301 from oldname/oldpath to newname/newpath to your .htaccess file.
but this does not describe the process for creating a new WP permalink (URL) or 'page'.

I saw no mention of this being a WP case which is a good bit different from static pages and adds the various alternate URLs such as /category/, /archive/ /tags/ (if used) that would not be affected by a one-off 301 to a new URL. Much depends on how you're configuring these changes, how 'pages' are currently formatted (the permalink syntax) and how/whether you have set up canonicalization and indexing of all current URL versions.

In WP, pages do not physically exist, they are formed on the fly depending on the request and every 'page' has multiple copies under other URLs. It is dependent on the settings encoded into your WP and any plugins that modify those defaults. It adds a layer of complication to your plans.

4:07 am on Aug 20, 2019 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 29, 2005
posts:10481
votes: 1100


@not2easy ... valid comments! I completely missed the WP foundation ... while the basic instruction for redirects remains valid, the physical properties of WP adds a different layer of complication.

I don't use WP for anything and avoid taking clients that insist on using it. Unless the money is too good to wave off!
7:25 am on Aug 20, 2019 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Sept 7, 2006
posts: 1136
votes: 140


I do not think that Wilburforce's suggestion was meant to be used in a WordPress scenario.


That is correct. I didn't realise it was WP. I'm with Tangoir. In coding WP makes FrontPage - if anyone still remembers it - look pristine,

Getting rid of WP is certainly more of a task (and you would have to cut and paste a lot of content), but it would get rid of headaches like this one, and a lot of others too.

Otherwise, possibly this discussion should go here: [webmasterworld.com ]
5:02 pm on Aug 20, 2019 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:Jan 8, 2019
posts: 93
votes: 2


"Much depends on how you're configuring these changes, how 'pages' are currently formatted (the permalink syntax)"

My current URLs use "parents" like /legal-areas/." I'm assuming I'll need to create new sets of parents for the new hierarchy I'm planning, since I'm breaking my pages down into groups based on the actual legal area i.e. /auto-accidents/ or /workers-comp/.

"and how/whether you have set up canonicalization and indexing of all current URL versions."

Our rel=canonical tags are left empty at the moment. I believe this is either a mistake or the previous dev knew there aren't duplicate versions of any of the pages so they left it blank on purpose. I usually use self-referencing canonicals unless the page has what Google might deem duplicate versions.

Not sure if blank canonicals will throw a wrench in my copy/paste redirect process. I will probably instruct dev to add self-referencing canonicals to our main pages. And if there are indeed multiple versions under different URLs (which I can't find right now) then I can set their canonicals to said main page.

"They are formed on the fly depending on the request and every 'page' has multiple copies under other URLs."

Interesting, I don't see multiple copies of our pages anywhere :/
5:52 pm on Aug 20, 2019 (gmt 0)

Administrator from US 

WebmasterWorld Administrator not2easy is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 27, 2006
posts:4530
votes: 350


WP has several auto-created ways to find the same content. These are created by using a (virtual) directory as a category of pages. Each page may be found either by browsing the /category/ or by its original permalink or by date under the /archives/ and if you are using "tags", each of those tags is similar to a category. You will not likely see a menu listed for all these variations, they are created in response to internal search functions. There is no set of specific possibilities unless all settings are at default. Each case depends on how its particular WP was set up.

To see your copies, search for terms you might expect visitors to use, preferably when not logged in as admin. Canonical to its permalink is a good thing in most cases.
6:03 pm on Aug 20, 2019 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:Jan 8, 2019
posts: 93
votes: 2


@not2easy Now I see what you mean! Any idea if these /category/ and /archive/ pages will cause serious problems when I redirect the original permalink?
6:17 pm on Aug 20, 2019 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:15903
votes: 877


WP has several auto-created ways to find the same content.
Is this predictable enough that search engines will request pages under alternative URLs, in the same way that they habitually* request both /directory and /directory/ ?


* I checked. Google doesn’t do this nearly as often as bing, but it does show up sporadically. And even bing has now dropped the once-popular /index.html alternative.
6:58 pm on Aug 20, 2019 (gmt 0)

Administrator from US 

WebmasterWorld Administrator not2easy is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 27, 2006
posts:4530
votes: 350


When you find these pages on the site, look at the source code and ensure that the duplicate versions have canonical to the "main" permalink URL. Google is aware that WP defaults to unwanted habits, but there are so many effective solutions they don't seem to take it as duplicate, as though they've internalized the situation and sort of filter it out. You just want to make sure that only one version is THE canonical version.

Set up your sitemaps to only list that one you want to be indexed. It is simple on smaller sites to compare all your sitemaps but on larger sites it may take more dedicated work to be certain.

@lucy24- the patterns are predictable but not universally implemented. Also, permalink syntax is custom so each site may be 'individual' (though with the number of WP sites, there are bound to be millions of pattern matches.)
8:59 pm on Aug 20, 2019 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:Jan 8, 2019
posts: 93
votes: 2


@noteasy

Thanks! Very, very helpful stuff.
1:26 am on Aug 21, 2019 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:Jan 8, 2019
posts: 93
votes: 2


@noteasy

Just following up!

I plugged a popular term ("accident") into our internal search. I was brought to a /?s=accident URL that's a directory of all articles related to "accident." I click one of these articles, and I'm sent to the original permalink. I did not find any copies i.e. same page different URL.

Next I clicked on one of the listed categories on our blog ("auto accident"). I was brought to a /category/auto-accident/ page that is a directory of all articles related to that category. I click one of these articles and I'm brought to a permalink.

So I've definitely found /category/ pages (the directories you mentioned). But not "multiple copies under other URLs." Unless I'm misunderstanding the meaning of that phrase.

In other words I haven't found the same content on two different pages that have two different URLs. So unless I'm misunderstanding, I don't need to canonicalize any duplicates to the original permalink.
2:34 am on Aug 21, 2019 (gmt 0)

Administrator from US 

WebmasterWorld Administrator not2easy is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 27, 2006
posts:4530
votes: 350


Yes, Category pages will list one of the copies. If tags were applied, each tag would create a similar list or directory of all pages with that tag. You have found one of the ways that these additional URLs are created by WP. There are more. As mentioned before I cannot know how the site is set up, that is inside your settings - so when Google shows you others you will know how/where they came from.

Yoast offers an excellent explanation that may be more helpful to you: [yoast.com...]
10:31 am on Aug 21, 2019 (gmt 0)

New User from IN 

joined:Aug 17, 2019
posts: 3
votes: 1


I had to change more than 100 urls from long urls to short urls........ I changed them and 301 redirect the previous url to new url...... I didn't see any ranking drop.
4:53 pm on Aug 21, 2019 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:Jan 8, 2019
posts: 93
votes: 2


@3lephant

What was your process for creating the 301 redirects?
7:52 am on Aug 22, 2019 (gmt 0)

New User from IN 

joined:Aug 22, 2019
posts:7
votes: 0


Good question my friend!
The main thing I want to share with you regarding your question...
When that article is ranking & generating the traffic to the website you shouldn't change the URL structure. In this case, you need to update the content i.e add new points to the existing content. Even though you want to change the URL, edit the existing one & add redirection from OLD URL to NEW URL.
4:14 pm on Aug 22, 2019 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:15903
votes: 877


Good question my friend!
Do you mean that you don’t know how it was done, mechanically, because it was all done by Tech Guy? (Otherwise it sounds like one of those Generic Politician Jokes, where “I’m glad you asked that question” translates as “I have no intention of answering that question”.)
11:09 pm on Aug 22, 2019 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 29, 2005
posts:10481
votes: 1100


True. Just another way of doing the same thing. Not all servers support rewrite. :)
12:33 am on Aug 23, 2019 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:15903
votes: 877


Not all servers support rewrite.
I do not recommend trying to run WordPress on a server that does not support mod_rewrite.

:: idly wondering if this thread would have fewer tangents if it had been located in the WordPress subforum ::
4:19 am on Aug 23, 2019 (gmt 0)

Administrator from US 

WebmasterWorld Administrator not2easy is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 27, 2006
posts:4530
votes: 350


I have moved the thread to the WordPress forum to keep it useful since we learned that the URLs in question are WordPress URLs.

I do not recommend trying to run WordPress on a server that does not support mod_rewrite.

No, you can't run WordPress on Apache without the mod_rewrite module. The WordPress.org basic requirements [wordpress.org] for current WordPress installation are listed as:
PHP 7.3 or greater
MySQL 5.6 or greater OR MariaDB 10.0 or greater
Nginx or Apache with mod_rewrite module
HTTPS support