Redirect Configuration
In this section, you can learn how to direct traffic from a specific URL to another within the Page Rules area. To begin, navigate to the Page Rules section of your user panel under the VergeCloud CDN service and select the option to Add New Rule.
Glossary
- Redirect: A method for sending users from one URL to another.
- Page Rules: Settings that allow you to modify how your website behaves.
- HTTP Status Codes: Numeric codes that represent the result of a server's response to a browser request.
Real Usage Scenarios
A practical example would be if your website has moved to a new domain and you want to ensure that visitors using the old URL are seamlessly redirected to the new address.
Field/Option Descriptions
URL: In the new window that appears, enter the URL you wish to redirect (for example, vergecloud.site).
Redirect Option: Choose the Redirect option from the dropdown menu.
Status Activation: Activate the status and select one of the following codes: 301, 302, or 307.

HTTP Status Codes Explained
- Code 301 (Permanent Redirect): This indicates that the URL has permanently changed to a new one. It informs search engines that the new URL replaces the old one indefinitely. If you intend to retain the old URL while making a temporary change, utilize the 302 redirect code instead.
- Code 302 (Temporary Redirect): This code signifies a temporary move, suggesting that while the content is accessible, it is located at a different URL. Use this when you want to redirect visitors temporarily without altering the search engines' indexing of the original URL.
- Code 307: Similar to the 302 code, but specifically for HTTP/1.1. This code ensures that the request method remains unchanged during the redirection process, while the 302 code may alter the request method from POST to GET in HTTP/1.0.
Once you have selected your code, input the domain you wish to redirect from in the URL section and click on Create.
Advanced Redirect Settings
When setting up redirects, VergeCloud allows you to use patterns in Page Rule URL and variables in Redirect URL to create flexible rules that cover multiple URLs. This is especially helpful when you want to preserve the path or filename during redirection.
How Patterns Work
A pattern uses the *
(asterisk) symbol to match one or more segments of the URL. Each asterisk represents a capturable variable in the incoming request.
sample.com/*
matches sample.com/page
, sample.com/docs/index.html
, etc.*.sample.com
matches any subdomain like blog.sample.com
, shop.sample.com
sample.com/assets/*.jpg
matches image files like sample.com/assets/banner.jpg
How Variables Work
Each *
in the pattern corresponds to a numbered variable that can be used in the URL input at the rewrite section. These variables are represented as $1
, $2
, and so on, in the order they appear.
- A pattern of
sample.com/*
with destination newsample.com/$1
means:
sample.com/page
→ newsample.com/page
sample.com/docs/index.html
→ newsample.com/docs/index.html
- A pattern of
*.sample.com/*
with destination $1.newsample.com/$2
means:
blog.sample.com/article
→ blog.newsample.com/article
shop.sample.com/item/123
→ shop.newsample.com/item/123
Important Notes
- Query strings (
?key=value
) are not automatically passed to the destination. - If no
*
is used in the source pattern, then no variables are available for the destination. - You can combine multiple wildcards in both the source and destination to create complex redirect behavior.
This approach ensures that visitors are redirected to the correct equivalent location on the new domain or subdomain, preserving structure and improving user experience.
Testing and Validation
After configuring your redirect, to verify its functionality, you can open a browser and navigate to sample.com/example.html. You should be automatically redirected to newsample.com/example.html.
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 ...
Securing and Optimising WordPress with VergeCloud Edge Protection
Securing and Optimising WordPress with VergeCloud Edge Protection Keeping your WordPress site secure and fast is critical—especially as online threats and performance demands grow. VergeCloud’s edge-based protection services help you defend your site ...
VergeCloud Web Application Firewall (WAF) Penetration Test
VergeCloud Web Application Firewall (WAF) Penetration Test 1. Cross-Site Scripting (XSS) via cURL Command Used: curl -v "http://example.com/onload=alert("XSS")>" This is a CLI-based variation of the previous test, where a cURL command simulates a ...
Advanced HTTP Header-Based Firewall with VergeCloud
Understanding the Challenge Traditional firewalls focus on IP-based filtering, which can be bypassed by proxy networks, VPNs, and botnets. As attackers evolve, businesses require finer-grained security controls to detect and block threats at the HTTP ...
Modify HTTP Headers on the Fly with VergeCloud CDN
Understanding the Challenge Web applications and APIs rely on HTTP headers for authentication, caching, security, and traffic management. However, modifying headers at the origin often requires server-side code changes, leading to: Complex deployment ...