Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Duplicate title problem - need some advice

         

bramley

8:34 am on Dec 1, 2011 (gmt 0)

10+ Year Member



Google WMT is showing thousands of duplicate titles on my CMS site, where many are cause by two forms of the same URL that follow this pattern :

1) ...php?a=200%3Apanoramic~photographs~of~beijing~part~3
2) ...php?a=200:Panoramic-Photographs-of-Beijing-(part-3)

First Q is which format is better (more correct) ?
Second Q is how is the first being generated (a PHP function is changing the ':' to '%3A' ?) ?
Third Q is how to fix this. With a rewrite rule in htaccess ?

enigma1

1:45 pm on Dec 1, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



First of all are these values appended to the links generated from your web application or first time you see them? If they are, best to use hyphens for the names and best to use a single link instead of the various values. For example:

example.com/panoramic-photographs-of-beijing-part-3.html

This will also help for the encoding/decoding problems with urls. And yes 3A is the ascii hexadecimal for double column can be created by php functions.

Now even if you have all these in place that would still give duplicate titles if you have multiple urls point to the same page (if the code of the application you use generates them somehow)

g1smd

3:11 pm on Dec 1, 2011 (gmt 0)

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



The colon should be encoded when it appears in query string data. Simple answer: don't use colons in query strings.

You can redirect URLs with tilde to equivalent URL with hyphen easily enough.

Rewrite (that's rewrite not redirect) requests with tilde to a simple PHP script that transforms the URL format and sends a 301 redirect back to the browser.

bramley

4:28 pm on Dec 1, 2011 (gmt 0)

10+ Year Member



Thanks guys.

Spent all afternoon rewriting titles in the DB where necessary and used meta refresh/0 to redirect to a single version. Too complex for RewriteRules as some articles don't have video content and the capitalisation is missing in some links.

That took a while to get right but it passed all my tests (finally).

There was one place that was writing an alternative form of the title so changed that. The others are listed in WMT because they had been used at some time in the past.

Now 6-8 weeks to see the benefit ...

Thanks again - I'm sure to use your tips in the future.

g1smd

7:04 pm on Dec 1, 2011 (gmt 0)

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



Meta refresh is a long way from ideal, but better than nothing.

Andem

8:34 pm on Dec 1, 2011 (gmt 0)

10+ Year Member Top Contributors Of The Month



Since you are using databases to specify the correct URL and PHP to code your pages, I'm wondering why you don't just produce something like a header("HTTP/1.1 301 Moved Permanently") (.. etc) for those pages?

Edit: If you know PHP, you must know what I'm talking about. If not, talk to whoever you hired. If he has no idea, fire him and get somebody who knows what they are doing.

bramley

12:07 am on Dec 2, 2011 (gmt 0)

10+ Year Member



@g1smd - I figured that since I'd corrected the bad (old)code that once Google had removed the wrong URLs the metarefresh would no longer be called.

@Andem - I should fire myself! I was using header()s for some tasks and meta refresh for others, in the same script!

Fixed it now and it works; faster too :) Thanks!