Announcement

#1 2012-07-25 15:41:01

geoffschultz
Member
Marlborough, MA, USA
2012-07-01
148

[resolved] Only 1 URL per Image/Album for Search Engines?

Right now I have my robots.txt restricting access to my gallery (which is in /photos off of the home page directory).  My images are highly indexed by search engines and before I release them onto it, I want to figure out how to only have 1 index per image.  Likewise I only want 1 index per album.  For example, for the image:

domain/photos/picture/20120520_194631860/category/isla_carmen_bcs_mexico

Ideally I only want it indexed by:

domain/photos/picture/20120520_194631860  (Note I'd accept the above URL)

and the album indexed by:

domain/photos/index/category/isla_carmen_bcs_mexico

The problem is that these images/albums can be indexed via slideshows, favorites, tags, most visited, various sized images, etc.  Does anyone have any suggestions on how to limit this and/or what all of the URL options that I need to restrict are?

-- Geoff

Last edited by geoffschultz (2012-07-25 15:44:05)

Offline

 

#2 2012-07-25 15:57:22

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: [resolved] Only 1 URL per Image/Album for Search Engines?

hello,
this is useless, because Piwigo use the "canonical" meta tag (header.tpl line 43)

if Search Engines are well coded (I assume they are !) they use this canonical url instead of page url when available

Offline

 

#3 2012-07-25 18:55:44

geoffschultz
Member
Marlborough, MA, USA
2012-07-01
148

Re: [resolved] Only 1 URL per Image/Album for Search Engines?

I'm using Stripped and I see no <link rel="canonical"> tags in my generated HTML, or are you relying on the search engines to normalize the URL?

As far as line 43 in header.tpl, this is what I see starting at line 42

Code:

{if isset($U_PREFETCH)          }<link rel="prefetch" href="{$U_PREFETCH}">{/if}

{if not empty($page_refresh)    }<meta http-equiv="refresh" content="{$page_refresh.TIME};url={$page_refresh.U_REFRESH}">{/if}

{get_combined_scripts load='header'}

What am I looking for?

-- Geoff

Last edited by geoffschultz (2012-07-25 18:56:13)

Offline

 

#4 2012-07-25 18:58:57

geoffschultz
Member
Marlborough, MA, USA
2012-07-01
148

Re: [resolved] Only 1 URL per Image/Album for Search Engines?

Ah, I just looked at the "default" template and see

Code:

{if isset($U_CANONICAL)}<link rel="canonical" href="{$U_CANONICAL}">{/if}

Why doesn't stripped use this?

-- Geoff

Offline

 

#5 2012-07-25 18:59:40

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: [resolved] Only 1 URL per Image/Album for Search Engines?

I notified the author

Offline

 

#6 2012-07-25 19:44:52

Zaphod
Former Piwigo Team
2006-11-13
441

Re: [resolved] Only 1 URL per Image/Album for Search Engines?

I don't know what conical is... And when was this introduced in the templates.

Offline

 

#7 2012-07-25 19:50:12

geoffschultz
Member
Marlborough, MA, USA
2012-07-01
148

Re: [resolved] Only 1 URL per Image/Album for Search Engines?

mistic100 wrote:

I notified the author

Thanks! 

I inserted

Code:

{if isset($U_CANONICAL)}<link rel="canonical" href="{$U_CANONICAL}">{/if}

into the stripped header and it does exactly what I was asking for.

-- Geoff

Offline

 

#8 2012-07-25 19:59:01

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: [resolved] Only 1 URL per Image/Album for Search Engines?

Zaphod wrote:

I don't know what conical is... And when was this introduced in the templates.

http://piwigo.org/releases/2.4.0#canonical_url ;-)

Offline

 

#9 2015-12-21 18:12:12

Bredy
Guest

Re: [resolved] Only 1 URL per Image/Album for Search Engines?

I have the same problem with stripped theme. I have to insert

Code:

{if isset($U_CANONICAL)}<link rel="canonical" href="{$U_CANONICAL}">{/if}

after prefetch?

Thanks

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact