Zen Cart Logo
Forums / General Questions / Link returning 410 code but works

Link returning 410 code but works

Views: 975

Results 1 to 6 of 6
16 Apr 2023, 1:49 AM
#1
nicksab avatar

nicksab

Totally Zenned

Join Date:
Apr 2011
Posts:
592
Plugin Contributions:
0

Link returning 410 code but works

I need some assistance with the link in my Mega Menu.

site is at http://royal-fleur.com

When checking my site for broken links, the link in my mega menu are shown as 410 gone but the link works.

i.e the roses link on the second tab of the menu work just fine but it being returned as410 on seo websitechecker.

It is mostly a seo concerned at this point but if there is a way to fixit, that would be great.

Thank you

16 Apr 2023, 7:54 AM
#2
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Link returning 410 code but works

On the roses page, and others, you have this in your source code

<meta name="robots" content="noindex, nofollow">

Which I think would be the reason for the 410. As to why, not sure off the top of my head.

16 Apr 2023, 2:22 PM
#3
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Link returning 410 code but works

One reason this can happen is if the category 'Roses' is disabled but the products within it are enabled, then navigating direct to the 'Roses' page from a hard-coded link in your top menu will show a noindex... on that page.

17 Apr 2023, 12:52 AM
#4
nicksab avatar

nicksab

Totally Zenned

Join Date:
Apr 2011
Posts:
592
Plugin Contributions:
0

Re: Link returning 410 code but works

simon1066:

One reason this can happen is if the category 'Roses' is disabled but the products within it are enabled, then navigating direct to the 'Roses' page from a hard-coded link in your top menu will show a noindex... on that page.

Thank you Simon. That's exactly how it is. 'Roses' category is disabled but not the products within it.

It is setup this way because i don t want these category to show in the sidebox and to be only accessible from the "mega menu" or via direct link.

Apparently the links work but i am more concerned on the SEO stand point.

Is there a way to fix it? so the link don t shows as "broken"

Thank you for your help

17 Apr 2023, 9:19 AM
#5
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Link returning 410 code but works

You are probably on ZC v1.5.7a/b/c rather than just plain ZC v1.5.7, so comment out these lines as described in

\includes\modules\pages\index\header_php.php

//-bof-Comment the following four (4) lines out to display disabled categories
        } elseif ($current_category_is_disabled) {
            $category_depth = 'products';
            $robotsNoIndex = true;
            header('HTTP/1.1 410 Gone');
//-eof-Comment the above four (4) lines out to display disabled categories
18 Apr 2023, 2:25 AM
#6
nicksab avatar

nicksab

Totally Zenned

Join Date:
Apr 2011
Posts:
592
Plugin Contributions:
0

Re: Link returning 410 code but works

simon1066:

You are probably on ZC v1.5.7a/b/c rather than just plain ZC v1.5.7, so comment out these lines as described in

\includes\modules\pages\index\header_php.php

//-bof-Comment the following four (4) lines out to display disabled categories
} elseif ($current_category_is_disabled) {
$category_depth = 'products';
$robotsNoIndex = true;
header('HTTP/1.1 410 Gone');
//-eof-Comment the above four (4) lines out to display disabled categories



Thank you Simon. You  are awesome :clap: