301 redirect from Shopify subfolder (/uk) to a separate OpenCart site
A client approached us with a task to split traffic between two different CMSs without changing the link structure for users and search bots (SEO).
Initial situation:
site-A.me — an international site on Shopify (was to remain untouched).
site-A.me/uk — the Ukrainian version that needed to be migrated to a new platform.
site-B.ua — a new standalone site on OpenCart.
Critical condition: Set up automatic redirection (301 redirect) from site-A.me/uk/* to site-B.ua/* while fully preserving the path and query parameters (e.g., UTM tags or filters). Standard Shopify redirect tools could not be used as they disrupted the operation of the main international domain.
What was done (Technical solution):
Since the task required traffic separation before the request reached Shopify servers, the solution was implemented at the Edge servers / Reverse Proxy level (Cloudflare).
1. Architecture analysis: Current DNS and proxy server settings were analyzed to isolate traffic for the language version.
2. Filtering rules development: Routing rules (Cloudflare Workers / Page Rules) were created and tested to intercept requests exclusively to the /uk/ directory.
3. URL structure preservation: Regular expressions (RegEx) were written for dynamic path substitution and preservation of query parameters (e.g., redirect from .../uk/products/item?color=red occurred without losing the color parameter).
4. SEO optimization: All redirects were set with a status of 301 (Moved Permanently), which allowed for the complete transfer of page weight (Link Juice) to the new OpenCart site without losing positions in search results.
5. Testing: Comprehensive testing of Edge rules was conducted — the main international site continued to operate normally.
Result for the business:
Complete isolation: The Ukrainian version of the site successfully migrated to OpenCart.
Security for the main site: The international Shopify site underwent no changes and continued to operate without technical failures.
SEO without losses: Thanks to correct 301 redirects, traffic and positions in Google were successfully transferred to the new domain.
#web_development #redirect #cloudflare #shopify #opencart #seo #dns #regex #sysadmin
Initial situation:
site-A.me — an international site on Shopify (was to remain untouched).
site-A.me/uk — the Ukrainian version that needed to be migrated to a new platform.
site-B.ua — a new standalone site on OpenCart.
Critical condition: Set up automatic redirection (301 redirect) from site-A.me/uk/* to site-B.ua/* while fully preserving the path and query parameters (e.g., UTM tags or filters). Standard Shopify redirect tools could not be used as they disrupted the operation of the main international domain.
What was done (Technical solution):
Since the task required traffic separation before the request reached Shopify servers, the solution was implemented at the Edge servers / Reverse Proxy level (Cloudflare).
1. Architecture analysis: Current DNS and proxy server settings were analyzed to isolate traffic for the language version.
2. Filtering rules development: Routing rules (Cloudflare Workers / Page Rules) were created and tested to intercept requests exclusively to the /uk/ directory.
3. URL structure preservation: Regular expressions (RegEx) were written for dynamic path substitution and preservation of query parameters (e.g., redirect from .../uk/products/item?color=red occurred without losing the color parameter).
4. SEO optimization: All redirects were set with a status of 301 (Moved Permanently), which allowed for the complete transfer of page weight (Link Juice) to the new OpenCart site without losing positions in search results.
5. Testing: Comprehensive testing of Edge rules was conducted — the main international site continued to operate normally.
Result for the business:
Complete isolation: The Ukrainian version of the site successfully migrated to OpenCart.
Security for the main site: The international Shopify site underwent no changes and continued to operate without technical failures.
SEO without losses: Thanks to correct 301 redirects, traffic and positions in Google were successfully transferred to the new domain.
#web_development #redirect #cloudflare #shopify #opencart #seo #dns #regex #sysadmin