• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

How to set a "noindex,follow" on 404 pages

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › How to set a "noindex,follow" on 404 pages

This topic is: not resolved

Tagged: 404, noindex

  • This topic has 3 replies, 2 voices, and was last updated 9 years, 2 months ago by sebbi.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • June 22, 2014 at 5:35 am #111042
    sebbi
    Member

    Hi, how can i add the "noindex, follow" meta tag on a default genesis 404 page without using plugins or any other extra stuff? Many thanks.

    June 22, 2014 at 9:50 pm #111117
    nutsandbolts
    Member

    Try adding the following to the header scripts box in your theme settings:

    <?php if( is_404() ) { ?>
     <meta name="robots" content="noindex,nofollow" />
    <?php } ?>

    Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    June 23, 2014 at 3:14 am #111127
    sebbi
    Member

    Hi Andrea, thanks for your response, but this did not work proper, because it writes a second meta tag on all pages and posts. I tried to add this direct in the header.php of the genesis framework:

    if( is_404() ) { ?>
     <meta name="robots" content="noindex,follow" />
    <?php }

    this works almost proper, the meta tag appears on the 404 page only, but this writes a second meta tag as well as your suggestion and i'm not sure, how google handles two meta tag with "robots" and of course, i should DO NOT edit this file under any circumstances. 😉

    Do you have any different ideas?

    Sebastian

    July 27, 2014 at 6:01 am #115968
    sebbi
    Member

    Hi guys,

    does anyone here know how to put the "noindex" into the first "robots" meta tag?

    With the solution written above, i've got two of them, and Google seems to be ignoring the second one, they are always crawling the 404 pages 🙁

    So there is, due to theme settings, one robots meta with "noopd,noydir" and i want the "noindex" as well.

    Thanks

    Sebbi

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble