Robert Charlton

msg:4539605 | 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.
|
Dirk_php

msg:4539610 | 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? Thanks, Dirk
|
deadsea

msg:4539625 | 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.
|
Dirk_php

msg:4544174 | 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: <?php header("HTTP/1.1 301 Moved Permanently"); header("Location: /12345-dirks-gourmet-restaurant "); ?> Is this a good SEO solution?
|
g1smd

msg:4544187 | 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.
|
Dirk_php

msg:4544304 | 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? Thanks, Dirk
|
g1smd

msg:4544307 | 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.
|
Andem

msg:4544382 | 11:00 pm on Feb 10, 2013 (gmt 0) |
<?php 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 http://www.example.com/12345-dirks-gourmet-restaurant 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).
|
lucy24

msg:4544392 | 11:57 pm on Feb 10, 2013 (gmt 0) |
In your first post you explicitly said 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 and 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.
|
|