GetPublii / Publii

The most intuitive Static Site CMS designed for SEO-optimized and privacy-focused websites.
https://getpublii.com
GNU General Public License v3.0
6.06k stars 407 forks source link

[Bug]: Meta robots tag not generated when (index, follow) is selected. #1443

Closed hchasens closed 3 months ago

hchasens commented 3 months ago

Operating system

OSX, Arch Linux

Publii version

0.45.2

Post editor

None

Bug description

Meta robots tag not generated when (index, follow) is selected (which is the default option). It is, however, generated when other options, such as (index, follow, noarchive) is selected. This is an issue as google sometimes doesn't like to index pages it doesn't have explicit permission for.

Steps to reproduce

  1. Create a new page
  2. Export page as zip (or press preview)
  3. inspect page source and clt+f for robots

You'll notice it's not there. You can then try this again but under site settings -> SEO -> Frontpage change meta robots to (index, follow, noarchive). Repeat the steps and you'll see that robots has a positive result and the appropriate tag is there.

Default:

<title>test</title><meta name="generator" content="Publii Open-Source CMS for Static Site">

With (index, follow, noarchive):

<title>test</title><meta name="robots" content="index, follow, noarchive"><meta name="generator" content="Publii Open-Source CMS for Static Site">

Relevant log output

No response

bobmitro commented 3 months ago

This is because Google ignores the robots' index and follow meta tags, considering these as the defaults. So, there is no point in including them in the website code.

hchasens commented 3 months ago

My apologies. I was unaware of this.