Edit root page strapi

System Information
  • Strapi Version: 4.11.7
  • Operating System: debian 11
  • Database: mysql
  • Node Version: 16.20.1
  • NPM Version: 8.19.4

i would like to customize this page, this is the default / page, i tried adding an index.html but it works only if i go directly to /index.html, not very useful i found the ability to disable the serving of this page disabling the defaultIndex in the public middleware config, but is it possible to have a custom page ? to exposing too much info. and maybe a redirect to the url of the front app would be better, but without interfering with the api function

this page:

Hey @Darkmagister,

Same here. I’m trying to edit this page, but without success yet.
I’ve already tried this solution here but it’s not working.

Under version 4, the same ‘public’ middleware exists, but it looks for the index page template only within the Strapi node module (in the folder packages/core/strapi/lib/middlewares/public). Sadly it looks like this template wasn’t built to be customised - i.e. you can’t just configure the location of a different template. However, you can add new routes into Koa, that replace the default routes. This is used, for example, in redirecting requests for the home page to return the admin page (admin-redirect | Strapi Documentation). If you want a custom home page, instead of using ctx.redirect you can provide your own Koa handler that returns your custom page as the response.

I suggest you look at the code on Github to see how the default home page is created and returned, to give you ideas about how to build your own home page.