There are several ways to redirect or forward a URL.
Typical 301 Redirect
Go to cPanel and click on Redirects. This is also known as a 301 (permanent) redirect.
Search engines like Google prefer 301 redirects. Don’t worry; the redirect can be modified or deleted.
A 302 (temporary) redirect is less favored, but it functions the same as a 301.
Warning: Attempting to redirect domain.com to www.domain.com will result in a Redirect Loop error.
To enforce www, you need to use Apache Mod Rewrite, not a 301 redirect.
Parked Domain
You can park your domain in cPanel. This option is called Domains. When you enter the parked domain in the browser's address bar, your primary domain’s site will be displayed.