How to Configure Redirect Page Rules on VergeCloud for Effective Website Redirection

Setting Up Redirect Page Rules on VergeCloud: Guide to Managing Website Redirects

URL redirects are commonly used when moving content, changing domain names, consolidating websites, or directing visitors to updated pages. Instead of making changes on the origin server, VergeCloud allows redirects to be configured directly through Page Rules.

This feature helps ensure that visitors and search engines are automatically directed to the correct destination URL. Redirects can be configured for individual pages, entire directories, subdomains, or even full domain migrations. Depending on the use case, you can choose between permanent and temporary redirect types while preserving existing URL structures.

To begin, navigate to the Page Rules section of your VergeCloud CDN service and select Add New Rule.

Glossary

Redirect : A method of automatically sending visitors from one URL to another.
Page Rules : Settings that allow you to customize how requests are handled for specific URLs or URL patterns.
HTTP Status Codes : Numeric response codes returned by a server that indicate the result of a request. Redirect status codes inform browsers and search engines that content is available at a different location.

Real Usage Scenarios

A common example is when a website moves to a new domain and traffic needs to be redirected from the old URL to the new one. Instead of updating every external link, a redirect ensures visitors automatically reach the correct destination.

Another common use case is redirecting HTTP traffic to HTTPS. This helps ensure visitors always access the secure version of a website. Redirects are also frequently used during website redesigns, where existing URLs need to continue working even after content has been reorganized or moved to a different location.

Creating a Redirect Rule

Redirect URL

When creating a redirect rule, configure the following options:

URL

Enter the URL or URL pattern that should trigger the redirect.

Example:
vergecloud.site

Redirect Option

Select Redirect from the available rule actions.

Status Activation

Enable the rule and choose one of the following redirect status codes:

  • 301
  • 302
  • 307

Once you have selected the appropriate status code, enter the destination URL and click Create to save the rule.

HTTP Status Codes Explained

301 (Permanent Redirect)

A 301 redirect indicates that a URL has permanently moved to a new location.

This status code informs search engines that the new URL should replace the old one in their index. It is typically used during domain migrations, permanent URL changes, or website consolidations.

Use a 301 redirect when:

  • Moving to a new domain permanently.
  • Replacing old URLs with new ones.
  • Consolidating multiple websites into a single domain.

If the change is only temporary, consider using a 302 redirect instead.

302 (Temporary Redirect)

A 302 redirect indicates that content has been temporarily moved to another location.

Search engines generally continue indexing the original URL because the redirect is not considered permanent.

Use a 302 redirect when:

  • Performing maintenance.
  • Running temporary campaigns.
  • Testing alternate landing pages.
  • Temporarily redirecting traffic during updates.

307 (Temporary Redirect)

A 307 redirect is similar to a 302 redirect but preserves the original HTTP request method.

For example, if a client sends a POST request, the redirected request remains a POST request. This behavior is important for APIs, form submissions, and applications that rely on specific request methods.

Use a 307 redirect when preserving the original request method is required.

Advanced Redirect Settings

VergeCloud supports wildcard patterns and variables, allowing a single Page Rule to handle multiple URLs.

This is particularly useful during website migrations or when redirecting large sections of a website without creating individual rules for every page.

How Patterns Work

A pattern uses the * (asterisk) wildcard to match one or more segments of a URL. Each wildcard can capture part of the incoming request and make it available for use in the destination URL.

Examples:
sample.com/*

Matches:
sample.com/page
sample.com/docs/index.html
sample.com/blog/article

*.sample.com

Matches:
blog.sample.com
shop.sample.com
docs.sample.com

sample.com/assets/*.jpg

Matches:
sample.com/assets/banner.jpg
sample.com/assets/header.jpg
sample.com/assets/product.jpg

How Variables Work

Each wildcard in the source pattern creates a numbered variable that can be used in the destination URL.

Variables are referenced as:

$1
$2
$3

The numbering follows the order in which wildcards appear in the source pattern.

Example 1: Preserve URL Paths

Source Pattern:
sample.com/*

Destination:
newsample.com/$1

Results:
sample.com/page
→ newsample.com/page

sample.com/docs/index.html
→ newsample.com/docs/index.html

This approach helps preserve the existing URL structure after a domain migration.

Example 2: Preserve Subdomains and Paths

Source Pattern:
*.sample.com/*

Destination:
$1.newsample.com/$2

Results:
blog.sample.com/article
→ blog.newsample.com/article

shop.sample.com/item/123
→ shop.newsample.com/item/123

This is useful when migrating multiple subdomains while maintaining the same content structure.

Why Use Wildcards?

Wildcard-based redirects reduce the number of rules that need to be created and maintained. Instead of configuring redirects individually, a single rule can cover hundreds or thousands of URLs while preserving paths and directory structures.

Important Notes

Keep the following in mind when configuring redirects:

  • Query strings (?key=value) are not automatically passed to the destination URL.
  • If no wildcard (*) exists in the source pattern, no variables will be available for the destination URL.
  • Multiple wildcards can be combined to create more advanced redirect behavior.
  • Test redirect rules before deploying them to production environments.
  • Avoid creating redirect loops where the destination URL redirects back to the original URL.

When planning large-scale migrations, it is recommended to validate a small set of URLs first to ensure the redirect behavior matches expectations.

Testing and Validation

After creating a redirect rule, verify that it behaves as expected.

For example, if your configuration is:

Source Pattern:
sample.com/*

Destination:
newsample.com/$1

Opening:
sample.com/example.html

should automatically redirect the visitor to:
newsample.com/example.html

You can test redirects directly in a browser or use browser developer tools to verify the returned status code. Command-line tools such as curl can also be used to confirm whether the correct redirect response is being returned.

Testing is especially important when using wildcard patterns, as a single rule may affect a large number of URLs.

Summary

Page Rules provide a simple way to configure URL redirects without modifying origin server configurations. Whether you're migrating to a new domain, redirecting outdated content, enforcing HTTPS, or preserving URL structures during a website migration, redirects can be configured quickly through the VergeCloud dashboard.

By combining wildcard patterns and variables, you can create flexible redirect rules that scale across large websites while ensuring visitors and search engines are directed to the correct destination.

    • Related Articles

    • Page Rules and Caching Settings for WordPress with VergeCloud CDN

      Setting Up Page Rules and Browser Caching for Your WordPress Site with VergeCloud CDN When you activate VergeCloud CDN for your WordPress site, content is cached on VergeCloud's edge servers for 30 minutes by default. However, some parts of your ...
    • VergeCloud Error Codes

      While using VergeCloud services, you may occasionally encounter platform specific error codes. These errors are not random system failures. They usually indicate that a configured rule, security policy, or access restriction has been triggered. This ...
    • Understanding the "Upgrade" HTTP Header and Its Impact on Your Website

      What is the "Upgrade" Header ? The Upgrade header is key for applications needing to switch protocols without creating new connections—like WebSockets. By configuring your server and VergeCloud to properly handle upgrade requests, you can maintain ...
    • Securing and Optimising WordPress with VergeCloud Edge Protection

      WordPress powers millions of websites worldwide, making it one of the most popular content management systems on the internet. Its popularity, however, also makes it a common target for automated attacks, brute-force login attempts, vulnerability ...
    • Understanding VergeCloud’s DDoS Challenge Modes

      Distributed Denial of Service attacks are one of the most common threats faced by modern websites and online services. Attackers attempt to overwhelm servers with massive volumes of traffic or exploit application behavior to exhaust resources. If the ...