#How to configure host redirect to Zillow URL?

30 messages · Page 1 of 1 (latest)

bronze cove
#

I'm trying to setup subdomain forwarding to a rental listing on Zillow.

Our rental properties are advertised on Zillow. We'd like to setup a subdomain for each property and watermark all images with the subdomain. Watermarking is necessary to make it harder for fraudsters to steal our images, list the same property on Craigslist or elsewhere, and scam people out of money.

Basically, I want any hits to our subdomain to redirect to the Zillow listing. This is temporary until we have our own systems built for listing rentals.

Here's how it is configured:

DNS for mydomain.com:

Rules for mydomain.com:

This doesn't work. Going to houseid.mydomain.com gives this error:

403 ERROR
The request could not be satisfied.
Bad request. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
Generated by cloudfront (CloudFront)
Request ID: xxxxxxxxxxxxxxx

I assume Zillow must be using CloudFront and their configuration doesn't like something I'm doing. I tried 301 as well.

Suggestions?

bronze cove
#

I was able to get it working using a Page Rule instead. But I don't understand why a Single Redirect isn't working. I'd prefer to use redirect rules, as I have more redirect rules available in my Cloudflare account than Page rules.

pearl sigil
# bronze cove I'm trying to setup subdomain forwarding to a rental listing on Zillow. Our ren...

I'm not sure where the watermarks come in, but if you just want to redirect on a subdomain, you can use a DNS Record with Type AAAA target 100:: (IPv6 Discard) proxied for "originless" records that CF handles internally. I'm guessing Zillow does not natively support CNAMEs like that/custom domains, and it's just working with it because Cloudflare handles the response before it goes to them

bronze cove
pearl sigil
#

The error you gave indicates the single redirect rule wasn't matching.
If you are going to have a lot of these, I would probably use Bulk Redirects rather then Single Redirects or Page Rules. You get a limited amount of Pages Rules/Single Redirects depending on your plan. Bulk Redirects has way more, depending on your plan

bronze cove
#

Also, the watermarks on the image are not important, just explaining why I want to do this. The images have the domain "houseid.mydomain.com" in a watermark to help protect a prospective renter from someone else using our images to try to scam them.

pearl sigil
bronze cove
#

Just so its clear, I have no control over zillow's servers or DNS.

pearl sigil
#

In this case, when you have the record proxied, the page rule is being hit first and Cloudflare responds without trying to talk to Zillow at all. All the Zillow DNS Record is doing is making Cloudflare understand they should respond to DNS Queries with their Proxy IPs, which you can achieve with an originless record as well

bronze cove
#

And I'd prefer to use Bulk Redirects, but I wanted to get a single one working first.

pearl sigil
#

Single Redirects (also called Dynamic Redirects) are a bit more flexible in what you can do with them logic wise, and Pages Rules will eventually be migrated away from

bronze cove
#

Oh really? So Single Redirects and Bulk Redirects are newer and will replace Page Rules?

#

Then I need to figure out how to convert my Page Rule that works into a Single/Dynamic Redirect, or even better a Bulk Redirect.

pearl sigil
#

Your use case fits Bulk Redirects pretty well, and you get more of them then you do Single Redirects/Page Rules

#

If you need a guide on them/info on how to get started, there is one here: https://developers.cloudflare.com/rules/url-forwarding/bulk-redirects/create-dashboard/
The one thing different about them is they exist Account level rather then website level.
You could create DNS Records ex. AAAA houseid.mydomain.com 100:: proxied
and then a bulk redirect item like
Source URL: houseid.mydomain.com
Target URL: https://www.zillow.com/homedetails/9999-example-address/2057997013_zpid/?view=public
Subpath matching: enabled
You don't want preserve path suffix, as it would try to append any path onto the end (i.e if they visited https://houseid.mydomain.com/test, it would append test to the end of your target url), nor do you want subdomain matching

To create Bulk Redirects in the Cloudflare dashboard you must:

bronze cove
#

All my tries aren't working yet, but I'll follow your instructions closely and try again. For DNS, is the entire target 100::? Or is it 100::ip-address-of-zillow?

pearl sigil
#

just 100::. What did you set up Bulk Redirects wise?

bronze cove
#

Got it working!

pearl sigil
#

oop ok, nice!

bronze cove
#

Thank you!! I enabled subpath matching, and fixed the DNS record.

pearl sigil
#

In case you get confused by this like I did originally, the way you add new Bulk Redirects to the list is clicking on "Edit" for the list, and then clicking on "Add Urls" in the breadcrumbs, then "Or, manually add URL redirects" add

#

Not the best UX there, but Bulk Redirects are def the best solution for this case

bronze cove
#

Yeah, I figured that out. It's not clear why there is no configuration besides a name and description when setting up a "Bulk Redirect". The only other thing is to select a Redirect List.

#

Perhaps it's to support this:

pearl sigil
#

Yeaa.. the "reason" as far as I know is because the Bulk Redirects List are part of Cloudflare's Generic List stuff (i.e IP Lists and Bulk Redirect Lists just exist in your account both as "List" items), and you are creating a separate "rule" that actually uses that list, which also allows you to turn it on/off at any time, and they themselves exist as generic "rulesets" in your account

#

technical reasons that make sense to them but make it more confusing. Perhaps in the future we'll get more customization on when bulk redirect rulesets entirely are enforced like Dynamic Redirects, which seems to be possible in the way it's set up, but not yet enabled

bronze cove
#

Makes sense. Makes lists reusable and reduces duplication, which could save users time.