About.html page prominently in search results, but missing in action

image

There’s a link to the about.html, but it is missing - as it is here on Meta: About - Discourse Meta

Did I overlook a setting etc.? Thanks!

there is no .html ext in discourse.

About - Discourse Meta <— this is the correct url

Yes, thanks, but Google somehow found one. :man_shrugging:

i dont see it
image

That’s interesting :wink: I do and I can find it like this as well:


-> about.html

Found it.

maybe install the sitemap plugin

Thanks, but it is installed already.

The sitemap plugin does not even advertise the /about page.
All I can think of is that somewhere someone has been linking to /about.html

and Discourse is returning a 200 OK for it :scream: :scream: :scream:

image

2 Likes

They return a 200 response for lots of document names, despite them being invalid:

  • faq.html
  • categories.html
  • u.html
  • tags.html
  • top.html
  • badges.html

I was wondering if this just related to built-in routes, but it works for the cake day plugin

  • /cakeday/anniversaries/today.html

but not knowledge-explorer, which 404’s on:

  • /docs.html

but not:

  • badges.html

:thinking:

Wasn’t there a similar problem with a js file a week or two ago?

2 Likes

Hmm, should we be returning 200 for these unusual URLs @eviltrout?

2 Likes

This issue is related to how rails routes work. By default it allows any endpoint to specify a :format parameter with an optional period. So .html means HTML format, .json means JSON.

about.html is the same as /about (both request the HTML version). However the about.html route doesn’t exist in Ember because we never use routes with the HTML extension, so we get a disagreement from the back and front end. The server returns 200 but the client side then says, no wait that’s not found.

There are ways to fix this. We could refine our rails routes to make sure they don’t support .html but continue supporting .json. I don’t see a way to apply this globally but maybe there’s something I’m unaware of.

Honestly I’m not too excited by this work. Unless there’s a super pressing reason to fix I can’t see, it I think we can live with it.

2 Likes