Advertisement:

Author Topic: Solution for 404 http header on empty categories/locations  (Read 6331 times)

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: Solution for 404 http header on empty categories/locations
« Reply #15 on: June 25, 2015, 12:14:10 am »
First of all thanks for explaining Aficionado.

So with modern theme (and maybe others) an empty category was 404'ed which Google does not 'like' and the 200 is a fix for this since there's nothing wrong with showing an empty category. I agree 8)

Makes me wonder, should this fix be considered a work-around for a missing feature of Osclass ie. it is Osclass that is generating the 404's or is that not correct?

@Eric

Osclass Modern theme sends a "soft" 404 (404 in http header) for empty categories but SHOWS the page.

The above code is removing that.

Now, for Google, not sure what it is best to do. With any kind of 404 error the categories with no items willl never be indexed. And that for a new website is not good.

Personally i have tried both solutions and i haven't seen any benefit from Google OR any penalty from Google. So i have installed the 404 removal.

Aficionado

  • Guest
Re: Solution for 404 http header on empty categories/locations
« Reply #16 on: June 25, 2015, 12:22:45 am »
@Eric

Nobody knows what exactly google likes or not, we only guess.

The 404 was used because Google doesn't like "thin" pages, pages with no data. But ads are thin anyway ....

Also a 404 was used because Google doesn't want to display adsense ads to empty pages, still many big sites do with no penalty (Google seems to have rules applied to small sites).


SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: Solution for 404 http header on empty categories/locations
« Reply #17 on: June 25, 2015, 12:41:03 am »
Okay, thanks again.

I think I just re-discovered why I had to ask about this.... ;)

Aficionado

  • Guest
Re: Solution for 404 http header on empty categories/locations
« Reply #18 on: August 20, 2017, 10:00:29 pm »
@Teseo hi, i just did some summer updating and everything for the new "season". Now i see that using OsclassWizards theme, and while i have your function at the end of theme's functions.php, i still see a "#" for empty categories/subcats.

Not sure what changed, i don't even remember what i did or not.

Any ideas ?

Thanks
« Last Edit: August 20, 2017, 10:02:32 pm by Aficionado »

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Solution for 404 http header on empty categories/locations
« Reply #19 on: August 20, 2017, 10:12:14 pm »
Hi,

Maybe you lose this additional modification:

https://forums.osclass.org/tips-and-tricks/solution-for-404-http-header-on-empty-categorieslocations/msg123531/#msg123531

It's the same for Osclasswizards.

Regards

Aficionado

  • Guest
Re: Solution for 404 http header on empty categories/locations
« Reply #20 on: August 20, 2017, 10:18:04 pm »
Hi,

Maybe you lose this additional modification:

https://forums.osclass.org/tips-and-tricks/solution-for-404-http-header-on-empty-categorieslocations/msg123531/#msg123531

It's the same for Osclasswizards.

Regards

True. I did the half if it. Missed it.

Many thanks !

 8)

mrtsoftware

  • Sr. Member
  • ****
  • Posts: 343
Re: Solution for 404 http header on empty categories/locations
« Reply #21 on: January 25, 2018, 02:14:37 pm »
Hi Aficionado, Sory for disturbing...
with above given codes / modification, did you achieve to let to crawl categories, cities, regions which has not item?

What is latest status about 404 increasing errors into Webmaster area and Google's crawling categories, cities, regions which has no item yet...

Aficionado

  • Guest
Re: Solution for 404 http header on empty categories/locations
« Reply #22 on: January 25, 2018, 02:59:49 pm »
Hi Aficionado, Sory for disturbing...
with above given codes / modification, did you achieve to let to crawl categories, cities, regions which has not item?

What is latest status about 404 increasing errors into Webmaster area and Google's crawling categories, cities, regions which has no item yet...

I have no idea but i see no errors in google webmaster.

But latetly i don't care much, the sites are made for Users and not Google, so as long as i have real human traffic ... it is ok be me.


mrtsoftware

  • Sr. Member
  • ****
  • Posts: 343
Re: Solution for 404 http header on empty categories/locations
« Reply #23 on: January 25, 2018, 04:02:13 pm »
Above / below given code, should make non item having category url clickable? Right?
I have done on Wizards theme, unable to click : www.antalya-tercume.com

From
<?php } else { ?>
<a class="category <?php echo $_slug; ?>" href="#"><?php echo $_name ; ?></a> <span>(<?php echo $_total_items ; ?>)</span>

to
 <?php } else { ?>
<a class="category <?php echo $_slug; ?>" href="<?php echo $_url; ?>"><?php echo $_name ; ?></a> <span>(<?php echo $_total_items ; ?>)</span>

teseo

  • Hero Member
  • *****
  • Posts: 6169

Aficionado

  • Guest
Re: Solution for 404 http header on empty categories/locations
« Reply #25 on: January 25, 2018, 04:20:13 pm »
Yes, all empty categories/subcatergories should be selectable (not #).

For me the code posted here:

https://forums.osclass.org/tips-and-tricks/solution-for-404-http-header-on-empty-categorieslocations/msg123531/#msg123531

works just (the TWO mods).

Also, checking your site, i see you VIOLATE Google adsense rules, adding Adsense to an EMPTY site. What is the purpose to have adsense in an empty site ?



mrtsoftware

  • Sr. Member
  • ****
  • Posts: 343
Re: Solution for 404 http header on empty categories/locations
« Reply #26 on: January 25, 2018, 05:30:59 pm »
Yes, site empty and no traffic, I have added it to try how it looks propose, how it looks in mobile devices...etc...

I will remove ads of course... Thank you for warning,


For not # , yes I had forgetten second mod, now Ok. URLS are clickable