How do I set up a www redirect page?

This guide explains how to configure an automatic web page redirect using an HTML meta refresh tag. This method automatically redirects visitors from your current web page location to a specified destination URL.

HTML Redirect Template

To set up an automatic redirect, create or edit an index.html file in your web directory and insert the following HTML code:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="REFRESH" content="0;URL=http://www.cs.stonybrook.edu">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <title>Page Redirect</title>
</head>
<body>
  <p>You will be redirected to another location. If you are not redirected automatically, <a href="http://www.cs.stonybrook.edu">click here</a>.</p>
</body>
</html>

Configuration Parameters

The redirection behavior is controlled by the content attribute within the <meta http-equiv="REFRESH"> element:

Parameter Component

Description & Usage

Delay Time (e.g., 0)

Specifies the number of seconds to wait before redirecting. Setting this to 0 redirects the user immediately upon page load.

Target Destination (URL=...)

Defines the destination web address. Replace http://www.cs.stonybrook.edu with your intended full URL (including http:// or https://).

Accessibility & Compliance Best Practices

  • Include a Fallback Link: Always provide a visible hyperlink in the document body. This allows users to manually navigate if automatic redirection is disabled in their browser.

  • Assistive Technology Support: Providing text feedback within the body ensures users utilizing screen readers are informed of the navigation event.