Why do tag pages without posts respond with a 404?

Ghost responds to tag pages (/tag/test/) with a 404 Not Found if the tag doesn’t exist, or if the tag exists, but has no published posts/pages attached.

Why respond with a 404 for a tag page that has been deliberately created?

Because the page doesn’t exist; it is only generated when a post is published.

If the page is considered as “not existing”, why are the tags not deleted from the tags page when the last post/page with the tag is removed?

1 Like

my thoughts too when I saw it

There could be draft posts that use the tags. Moreover, I wouldn’t expect, or want, the action of deleting a tag to be automatic.

1 Like

Having draft posts with tags applied would explain the existence of the tag. It doesn’t explain why the tag page responds with a 404.

I agree that tags shouldn’t be deleted automatically.

But I still don’t understand why the tag page with no published posts responds with a 404. Is this considered preferable to having a tag page with no posts? If so, why?

I could ask the exact opposite - why should a tag page with no posts respond with something :slight_smile: