Redirecting subdomains to root domain

Hi all,

Couldn’t find any similar topics on this in the forum/help articles.

Is there a way to redirect traffic from a subdomain to the root domain? We have decided to close a subdomain and wants to bring all the traffic back to the main domain page.

For e.g. (subdomain.website.com) → (website.com)

Appreciate your help.
Thanks all!