WordPress.org
  • News
  • Showcase
  • Hosting
    • Themes
    • Plugins
    • Patterns
    • Blocks
    • Openverse ↗︎
    • Learn WordPress
    • Documentation
    • Forums
    • Developers
    • WordPress.tv ↗︎
    • Make WordPress
    • Photo Directory
    • Five for the Future
    • Events
    • Job Board ↗︎
    • About WordPress
    • Enterprise
    • Gutenberg ↗︎
  • Get WordPress
Get WordPress
WordPress.org

WordPress Developer Resources

do_robotstxt

  • Developer Blog
  • Code Reference
  • WP-CLI Commands
  • Developer Blog
  • Code Reference
  • WP-CLI Commands
HomeReferenceHooksdo_robotstxt

do_action( ‘do_robotstxt’ )

In this article

  • Source
  • Related
  • Changelog

↑ Back to top

Fires when displaying the robots.txt file.

Source

do_action( 'do_robotstxt' );

View all references View on Trac View on GitHub

Related

Used byDescription
do_robots()wp-includes/functions.php

Displays the default robots.txt file content.

Changelog

VersionDescription
2.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.

  • About
  • News
  • Hosting
  • Privacy
  • Showcase
  • Themes
  • Plugins
  • Patterns
  • Learn
  • Documentation
  • Developers
  • WordPress.tv ↗
  • Get Involved
  • Events
  • Donate ↗
  • Five for the Future
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org
WordPress.org
  • Visit our Facebook page
  • Visit our X (formerly Twitter) account
  • Visit our Instagram account
  • Visit our LinkedIn account
  • Visit our YouTube channel
Code is Poetry