Using meta at the head
You can use html only to redirect.
To do it add to you head the followinf meta:
<meta http-equiv="refresh" content="0; url=http://example.com/" />
Alternatives
You can use JavaScript code to do the redirect.
The recommended way is to send a 301 in the header. If you are using Apache you can edit .htaccess
to do the redirect or configure a regular expresions with nginx.
Web applications like wordpress or cpanel allows you to configure redirects.