[solved] 1.9.4 news detail pages: 2 urls in search engines

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
jmires
Forum Members
Forum Members
Posts: 24
Joined: Thu Apr 02, 2009 7:32 pm

[solved] 1.9.4 news detail pages: 2 urls in search engines

Post by jmires »

I have a client's site using the News module.

Detail pages all use the same detail template, which is specified as the default detail template.

URLs look like this and work fine:
http://www.mysite.com/news/32/64/friendly-title-here

There's a page that lists news items by category, and has a series of tags like so:

Code: Select all

{news category='Category Name' sortby='news_title' sortasc='true'}
The page listing the news items by category has a content_id of 64, which is why the tld/article_id/64/friendly-title-here is the resulting URLs.

This all works fine.

What we are finding is that these pages are also showing up in search engine indexes (Google, Yahoo, etc.) as
http://www.mysite.com/news/32/[b]109[/b]/friendly-title-here

109 is the content_id of the homepage, which uses a completely different template, so those versions of the page are all screwed up.

There are links to recent news items from the homepage, but those links all point to the correct (...../64/....) version of the URL.

I can't figure out:
A. Why search engines are indexing the ....../109/..... version of the URL, since I can't find any pages that link to those URLs.
B. Why the rel=canonical doesn't seem to be working - both versions of the page have the rel=canonical set, and they both list their own URL.

This is the code in the template file for the canonical:

Code: Select all

{if isset($canonical)}<link rel="canonical" href="{$canonical}" />{elseif isset($content_obj)}<link rel="canonical" href="{$content_obj->GetURL()}" />{/if}
Any suggestions or assistance would be much appreciated!

Thanks!

Cms Version: 1.9.4

Installed Modules:

* CMSMailer: 2.0.1
* FileManager: 1.1.0
* MenuManager: 1.7.6
* ModuleManager: 1.4.1
* News: 2.11.2
* nuSOAP: 1.0.2
* Printing: 1.1.2
* Search: 1.6.10
* ThemeManager: 1.1.4
* TinyMCE: 2.8.4
* CGExtensions: 1.17.6
* CGFeedMaker: 1.0.4
* CGSimpleSmarty: 1.4.1
* FormBuilder: 0.5.11
* CMSSimplepie: 1.0
* CGBlog: 1.3.1
* Archiver: 0.2.3
* SiteMapMadeSimple: 1.2.2


Config Information:

* php_memory_limit:
* process_whole_template: false
* output_compression: false
* max_upload_size: 2000000
* default_upload_permission: 664
* url_rewriting: mod_rewrite
* page_extension:
* query_var: page
* image_manipulation_prog: GD
* auto_alias_content: true
* locale:
* default_encoding: utf-8
* admin_encoding: utf-8
* set_names: false


Php Information:

* phpversion: 5.2.16
* md5_function: On (True)
* gd_version: 2
* tempnam_function: On (True)
* magic_quotes_runtime: Off (False)
* E_STRICT: 0
* memory_limit: 64M
* max_execution_time: 30
* output_buffering: On
* safe_mode: Off (False)
* file_uploads: On (True)
* post_max_size: 12M
* upload_max_filesize: 10M
* session_save_path: /tmp (1777)
* session_use_cookies: On (True)
* xml_function: On (True)


Server Information:

* Server Api: cgi
* Server Db Type: MySQL (mysql)
* Server Db Version: 5.0.91
Last edited by jmires on Fri Dec 02, 2011 8:12 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: 1.9.4 news detail pages: 2 urls indexed by search engine

Post by Dr.CSS »

Did you set the default detail page in News options?...
jmires
Forum Members
Forum Members
Posts: 24
Joined: Thu Apr 02, 2009 7:32 pm

Re: 1.9.4 news detail pages: 2 urls indexed by search engine

Post by jmires »

Hi Dr. CSS,
Thanks for the reply. No, I didn't have a deafult page set in News > Options.

I'm not sure how I missed that - you think that would cause this issue?

I just set it, though it will take a few weeks to see if that fixes the search engine indexes.

Thank you!
jmires
Forum Members
Forum Members
Posts: 24
Joined: Thu Apr 02, 2009 7:32 pm

Re: 1.9.4 news detail pages: 2 urls indexed by search engine

Post by jmires »

Much belated changing this to solved, but I did confirm that this fixed it. Thanks!
Post Reply

Return to “CMSMS Core”