Redirect domain/address to subdomain/address

Trying to redirect traffic from domain to subdomain.

https://boostmycapital.com/virtual-coffee
to
https://ghl.boostmycapital.com/virtual-coffee

Rule above does not work.

The redirect in your screenshot doesn’t match the one in the text, but both are working as configured.

The one in the screenshot…

curl -I https://www.boostmycapital.com/investor-webinar-replay
HTTP/2 301
date: Sat, 25 May 2024 20:24:49 GMT
content-type: text/html
content-length: 167
location: https://ghl.boostmycapital.com/investor-webinar-replay
cache-control: max-age=3600
expires: Sat, 25 May 2024 21:24:49 GMT
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=T4xte1f60IZIr0fLl%2BBjTV1QJsTrzs9o6CNyzkaF6OkueaYNhAURNikSuY%2FO2WiE8VLLi4DqcyOgAPk0B1aKQTWpevvKSxWIW3Oyg8TM0%2Bb%2BVB7OvNq5TMnB2xxo0%2BCQFLtDEkdpfrx9"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 8898404a48df24ae-LHR

The one in the text…

curl -I https://boostmycapital.com/virtual-coffee
HTTP/2 301
date: Sat, 25 May 2024 20:26:24 GMT
content-type: text/html
content-length: 167
location: https://ghl.boostmycapital.com/virtual-coffee
cache-control: max-age=3600
expires: Sat, 25 May 2024 21:26:24 GMT
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=iHRsAJGnAqsuYktsB1MAlHHao8%2BIDWCibukX%2FU%2FAsfn8txGDOhE5eN0lY0gyKFbJwxKg%2Fps15bT57%2FdVkMva%2FLfhrln4RXYyJQa8nQmCj0VWoMDaqNJ5ts6kh772DFtBshqclFM%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 8898429e9d7c60ff-LHR

One is using www, the other your domain. Is that what you wanted as that’s what you’ve set up.

1 Like

Both boostmycapital.com and www.boostmycapital.com point the to the same pages, so with or if OK I suppose.

Thank you for checking the Cloudflare redirect.

But I am puzzled as to why I get a 404 error when I open https://www.boostmycapital.com/virtual-coffee or Virtual Coffee in a web browser

You are not redirecting for www.boostmycapital.com/virtual-coffee, only boostmycapital.com/virtual-coffee.

2 Likes

Both. Somehow the address without www turned into a link in the text in prior post.
just to be sure, I added a separate rule for the redirect the www address as well.
Still 404.

Thread can be closed.
I made the redirect at the website level (I did realize I had the option to redirect to a sub-domain there, on Wix, it’s in the SEO manager)