Go to cPanel and click Redirects. This is also known as 301 redirect.
The 302 (temporary) redirects are less favored, but behave no differently than 301.
Read more in the related article "Creating a URL redirect".
Trying to redirect domain.com to www.domain.com will give you a Continuous Loop Error.
To add the www, you need to use Apache Mod Rewrite, not a 301 redirect.
Masked Forward & HTML Forward: Visit this site to create either.
Note: You can accomplish a certain masked forward in cPanel. This is known as a Parked domain, and will show the parked domain name in a browser's address bar, while showing your primary domain's web site.
How do I redirect my website to another ip, but still keep my email here?
You must customize your A record. This record controls where you domain's website is hosted.
How do I redirect my subdomains to another site at the DNS level?
This is done with a CNAME record. This record controls each subdomain name like www and mail.
How do I redirect my emails to another server?
You must customize your MX record. This record controls to which host your emails will be delivered.