Why does disabling Pretty URLs not disable Pretty URLs? I’ve turned the feature off in Site Configuration > Build & deploy > Post processing > Pretty URLs. When that had no discernible effect, I added a netlify.toml file to the root of my site (unruffled-sinoussi-fbd7d8.netlify.app, primary domain: tinyapps.org) with [build.processing.html] followed by pretty_urls = false to no avail.
To redirect extensionless duplicates to their corresponding .html files, I’ve been instructed to use canonical tags or Edge Functions, but would prefer to simply disable the feature altogether for simplicity’s sake.
Thank you for your fast and kind reply, @luke. Both .html files and their corresponding extensionless versions continue to work in my testing; for example, both tinyapps.org/blog/202208280700_word-calculate-days-between-dates.html and tinyapps.org/blog/202208280700_word-calculate-days-between-dates lead to the same content, causing search engines to index them separately. Here’s an example from Kagi which returns both pages: kagi.com/search?q=Microsoft+Word%3A+Calculate+number+of+days+between+two+dates.
Thank you, @nathanmartin. Yes, I’d prefer having the .html showing, just like other hosted file extensions (PDF, TXT, ZIP, etc.). As for using _redirects (which would be swell), in another thread I was informed that it would not work, and to use rel=canonical or Edge Functions instead.
It’s easy enough to add the canonical tag to static pages, but I’ll have to tweak my blog publishing routine a bit to dynamically add the corresponding filename into each HTML page.
Was just hoping there was a way to stay standards-compliant and reduce overhead (even the extra ~100 bytes taken by each new link tag ;-).
Thank you, @nathanmartin. Yes, I have no doubt that should work; I use _redirects for several dozen static links at present. Do you know if there is any upper bound on the number of lines in _redirects? I’d need to add around 1,500 initially (which could be done very quickly by pairing a directory listing with a simple regex).
Sorry, @luke. I did not intend it to be a duplicate, but a continuation. In the first submission, I was told to use rel=canonical or Edge Functions as a workaround, but did not have an answer to why disabling Pretty URLs apparently had no discernible effect. I was hoping to understand that better and apologize if it came across as a duplicate.