These redirects can be done in web.config file of your project. Please refer to this article to read more.
But this wouldn't be considered as a good practice in terms of performance. I would recommend setting up these redirects on reverse proxy or load balancer. The reason is if you configure redirects on Kentico website level each redirect triggers Kentico request pipline to be executed and if you have a high traffic on your website this may become an issue.