homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Google / Google SEO News and Discussion
Forum Library, Charter, Moderators: Robert Charlton & aakk9999 & brotherhood of lan & goodroi

Google SEO News and Discussion Forum

How to handle multiple urls on database generated page?

 2:54 pm on Jan 26, 2013 (gmt 0)


I've a page that looks like: www.mysite.com/12345-test
12345 ==> a unique number
test ==> data that can be entered by a user (after login)

All the content on the page is coming from a database using the number in the url (12345). The 'test' part is not important to get the content, but gives more data to my visitors than a number.

1) If someone would link to this page with the following link: www.mysite.com/12345-teeeest
Than I can see in the database that 'teeeest' should be 'test' and I redirect the page to www.mysite.com/12345-test (using the php header function).
Can this give some seo problems?

2) Google knows this url: www.mysite.com/12345-test
Now the 'test' part is changed in the database to test2 and I redirect the page from www.mysite.com/12345-test to www.mysite.com/12345-test2
Can this give some seo problems? Google might see the same content on 2 different url's?

How to make sure all is ok for google?



Robert Charlton

 8:57 am on Jan 27, 2013 (gmt 0)

Hi Dirk, and welcome to WebmasterWorld.

I've got to confess I can't understand what the situation is. Your original title was "Rename the same page", which wasn't very descriptive for me, so I took a guess and changed it to what I thought might be more descriptive (in less than 70 characters).

What kind of page is this? What kind of interaction is the user having with the page? Why is the user entering data? And why are you changing the url because of this?

It sounds like this might perhaps be something like a page that is accepting a single comment from a user, but otherwise the bulk of the page is staying the same.

Please elaborate, if you can, using generic words like "widget", etc, if you need to instead of specifics. Right now, I simply can't envision what's going on.


 9:54 am on Jan 27, 2013 (gmt 0)

It's a site where restaurant owners can enter their information.
If there is a restaurant with the name 'Dirk's place', than the page will be something like /12345-dirks-place

If later on the restaurant owner changes the name on our site to 'Dirk's Gourmet Restaurant' the page will automatically be renamed to /12345-dirks-gourmet-restaurant

The problem is that google now has /12345-dirks-place in his database and it will find /12345-dirks-gourmet-restaurant when the robot comes to the site again. The content of these pages will be exact the same (except for the restaurant name).
The robot will maybe also check if /12345-dirks-place has been changed and while crawling this place, it will be forwarded (php header command) to the new url /12345-dirks-gourmet-restaurant

Will this give some SEO problems? Will google see this as an abuse?
How to make sure all is ok?



 11:30 am on Jan 27, 2013 (gmt 0)

Redirecting to the url with the correct name in it is called "url canonicalization". Doing so has been good SEO practice for over 10 years.

Letting googlebot access and index the same page on different urls IS a problem. It can cause Googlebot to do do much crawling, and in some cases lead to indexing problems due to duplicate content.

There is an alternative to redirecting. Nowadays you can use the canonical meta tag. Put:
<link rel="canonical" href="http://www.example.com/12345-test" />
Into the page to let Googlebot know which is the official one. Serves the same purpose as the redirects, but might be easier to implement.

Changing the url when the name of the restaurant changes can cause that specific page to lose some rankings for a while, but it should come back. I have worked for sites that do this and doesn't end up being a big problem.


 3:21 pm on Feb 9, 2013 (gmt 0)

Isn't canonical meaning that there are several versions of one page? That's not what I want.
I want my old page removed/replaced by the new one.

I've found the following that could be a solution:
header("HTTP/1.1 301 Moved Permanently");
header("Location: /12345-dirks-gourmet-restaurant ");

Is this a good SEO solution?


 3:43 pm on Feb 9, 2013 (gmt 0)

That's a pretty standard 301 redirect. The new URL replaces the old.

The target URL MUST include protocol and hostname.


 2:44 pm on Feb 10, 2013 (gmt 0)

Hi g1smd,

What do you mean with protocol and hostname?
Is hostname the sitename? www.mysite.com
What is the protocol? Do you have an example?



 3:00 pm on Feb 10, 2013 (gmt 0)

The protocol is http:// or https://

Hostname should be the canonical site hostname, presumably with www.


 11:00 pm on Feb 10, 2013 (gmt 0)

header("HTTP/1.1 301 Moved Permanently");
header("Location: /12345-dirks-gourmet-restaurant ");

This is incorrect and will not provide expected results. Your location should be something like

Also since this is the Google forum, you should return 404 errors when a page no longer exists and not use 301s for an infinite number of URLs (in my experience).


 11:57 pm on Feb 10, 2013 (gmt 0)

In your first post you explicitly said
and I redirect the page

As long as the redirect is taking place-- in a single step, 301 rather than 302-- there should not be any issues. Unless you rename the page every other week. Then g### will start getting annoyed.

More seriously: If you do rename a page more than once, make sure your redirect-generating code takes this into account, so that

a >> b
followed at some later date by
b >> c

automatically becomes

a >> c
b >> c

And if you have

a >> b

but later change it back to "a" (there's a local hotel that does this every few years) make sure you retain only the

b >> a

--both for SEO purposes and to keep from going around in circles.

a>>b plus b>>a
will result in a browser error if the new name is identical to some older name. Don't know about
a>>b b>>c c>>a
but you don't want to find out the hard way.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Google / Google SEO News and Discussion
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved