Make WordPress Core

Opened 3 years ago

Last modified 4 weeks ago

#58751 new defect (bug)

Add noindex to 404 template

Reported by: patrickggg's profile patrickggg Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch has-unit-tests
Focuses: Cc:

Description (last modified by sabernhardt)

This is a follow-up to #52457.

we had the same problem, but spam links use tags, they don't directly intrude on our website. How do we add the code so that google doesn't index it?

Example:

https://example.com/tag/%E5%81%87%E5%A4%9A%E5%93%A5%E5%AD%A6%E5%8E%86%E6%88%90%E7%BB%A9%E5%8D%95-(%E2%8F%A9%E5%8A%9E%E8%AF%81%E7%BD%91%E7%AB%99%E2%9C%94%EF%B8%8Fbbjjzz.com%E2%8F%AA)-%E5%81%87%E5%A4%9A%E5%93%A5%E5%AD%A6%E5%8E%86%E6%88%90%E7%BB%A9%E5%8D%95-%E5%8A%9E%E5%81%87%E8%8B%B1%E5%9B%BD%E8%B5%AB%E7%89%B9%E7%A6%8F%E5%BE%B7%E5%A4%A7%E5%AD%A6%E5%AD%A6%E5%8E%86%E6%96%87%E5%87%AD%E4%B8%8A%E6%B5%B7%E9%87%91%E5%B1%B1%E5%8C%BA-%E5%81%87%E5%A4%9A%E5%93%A5%E5%AD%A6%E5%8E%86%E6%88%90%E7%BB%A9%E5%8D%95-(%E2%8F%A9%E5%8A%9E%E8%AF%81%E7%BD%91%E7%AB%99%E2%9C%94%EF%B8%8Fbbjjzz.com%E2%8F%AA)-%E5%81%87%E5%A4%9A%E5%93%A5%E5%AD%A6%E5%8E%86%E6%88%90%E7%BB%A9%E5%8D%95-%E5%8A%9E%E5%81%87%E8%8B%B1%E5%9B%BD%E8%B5%AB%E7%89%B9%E7%A6%8F%E5%BE%B7%E5%A4%A7%E5%AD%A6%E5%AD%A6%E5%8E%86%E6%96%87%E5%87%AD

Attachments (1)

error 404.png (108.2 KB) - added by patrickggg 3 years ago.

Download all attachments as: .zip

Change History (3)

@patrickggg
3 years ago

#1 @sabernhardt
5 weeks ago

  • Description modified (diff)
  • Keywords needs-patch added
  • Summary changed from we had the same problem, but spam links use tags, a follow-up to #52457 to Add noindex to 404 template

Hi and welcome to WordPress Core Trac!

When I visited a nonexistent tag archive, these were the robots meta tags:

Core default (trunk)
<meta name='robots' content='max-image-preview:large' />

All in One SEO 4.9.5.1
<meta name="robots" content="noindex" />
(plugin has an aioseo_404_robots filter to override this specifically)

Yoast SEO 27.3
<meta name='robots' content='noindex, follow' />

This ticket was mentioned in PR #11617 on WordPress/wordpress-develop by @sukhendu2002.


4 weeks ago
#2

  • Keywords has-patch has-unit-tests added; needs-patch removed

Trac ticket: https://core.trac.wordpress.org/ticket/58751

## Use of AI Tools

Note: See TracTickets for help on using tickets.