Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#38501 closed defect (bug) (invalid)

Google indexes draft page in preview mode.

Reported by: milleronic's profile milleronic Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.6.1
Component: General Keywords:
Focuses: Cc:

Description

Any page or post should not be indexed by search engines if the status is not "publish". A meta tag should be added to a preview to discourage search indexing.

Change History (4)

#1 @lukecavanagh
8 years ago

@milleronic

Draft post previews can only be viewed if logged in.

So if Google does index a site, the draft post preview would return a 404 error.

Example

http://local.wordpress.dev/?p=967&preview=true

So if not logged in it will redirect to
http://local.wordpress.dev/?p=967

Which will return a 404 error on that post id.

https://productforums.google.com/forum/#!topic/webmasters/fzEHafWaRoc

#2 follow-up: @milleronic
8 years ago

I know that draft posts can only be seen if logged in, but search engines should not index them, as a search may bring up the post which will return a 404, which confuses people looking for something on the site. (This has occurred more than once on our site)

So can posts not having a status of 'publish' include a robots nofollow attribute in the head?

#3 in reply to: ↑ 2 @peterwilsoncc
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Replying to milleronic:

I know that draft posts can only be seen if logged in, but search engines should not index them, as a search may bring up the post which will return a 404, which confuses people looking for something on the site. (This has occurred more than once on our site)

So can posts not having a status of 'publish' include a robots nofollow attribute in the head?

I expect the cause on your site is a plugin removing the login check for previews. That the plugin allows Google to index the page is a plugin bug, not a core bug.

On a standard WP install, search engines will receive a 404 and will not index the site.

#4 @milleronic
8 years ago

No plugins on our site do what you mention. It is a standard WP install. Nevertheless, consider this closed. Thanks for your time.

Note: See TracTickets for help on using tickets.