301 Redirect Won't work

I’ve have reviewed all the CF docs many times, and have tried a number of tools (page redirects, bulk redirects) within CF to make this work, but can’t. So show me what I’m doing wrong:

  1. I have a domain pointing to a website, such as mysite.com. Works fine. (A root record and CNAME www record).

  2. I have a subdomain which I want to redirect to another external URL, such as YouTube.

  3. In DNS records, I set a new “A” record of “yt” as a subdomain of mysite.com (yt.mysite.com). I’ve also set the IP address to proxy, 192.0.2.1, orange cloud on.

  4. In Bulk redirect rules (using the form - and I have a ruleset in place), I set the source to “yt.myslte.com/” (so it picks up both non-SSL and SSL traffic) and the target to “https://www.youtube.com”. No other keys are set. (I’ve tried subdomain checkbox with no luck).

  5. I get a blank screen (DNS Probe) when browsing to yt.mysite.com, cleared cache and session cookies, same problem.

Thanks for your help.

When you obfuscate your domain, it is preferable to not use a real domain. The domains example.[com,net,org] are reserved for such use. We can offer better answers of you use your real domain.

I would not use bulk redirects unless you could not accomplish your goal with a single redirect. There is an excellent guide here in the Community.

Your error indicates that you are having DNS resolution issues. You should probably move from the browser to more useful testing tools like dig and curl.

1 Like

OK, here’s the real URL:
yt.rosemariespeaks.com, a subdomain of rosemariespeaks.com

I’m attempting to set up different subdomains (similar to a URL shortener),
so that lk.rosemariespeaks.com would go to the client’s linkedin profile, for example.

BTW: I just clicked the link, and it worked! Must be some time elapsing from setting the URL rewrite to actually responding. Same browser.

1 Like

Thanks for sharing the actual domain. I saw what you saw. If you tried to visit before the name existed, your DNS resolver may have cached the negative response. I often use an external public resolver to prevent negative cache from reaching my own resolvers. Lower level CLI tools like dig and curl provide better visibility into what is actually happening. Currently the lk host does not exist.

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.