Redirect one domain to main domain

What is the name of the domain?

http*://iscar.co.za

What is the issue you’re encountering

re-direct to https://www.iscar.co.za

What steps have you taken to resolve the issue?

I have tried redirect rules but I am missing something

Yes www.iscar.co.za works, but people don’t enter “www.” in anymore.
So I want to make a redirect that if you just do “iscar.co.za” it takes you to www.iscar.co.za or www.iscar.com.

You don’t have a DNS record for iscar.co.za. Create a proxied DNS record for @ pointing to AAAA 100:: as you are just redirecting. You can follow the guide here…

I have updated the rules, how long dose it take to update?

The update is near instant (under 30 seconds), however there is still no DNS record in place which is why the rule doesn’t work:

% curl -svo /dev/null https://iscar.co.za                    
* Could not resolve host: iscar.co.za
* Closing connection

% dig iscar.co.za @1.1.1.1

; <<>> DiG 9.10.6 <<>> iscar.co.za @1.1.1.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7863
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;iscar.co.za.			IN	A

;; AUTHORITY SECTION:
iscar.co.za.		1800	IN	SOA	anahi.ns.cloudflare.com. dns.cloudflare.com. 2351347352 10000 2400 604800 1800

;; Query time: 374 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Mon Sep 09 14:04:18 BST 2024
;; MSG SIZE  rcvd: 103

You need to create AAAA type DNS record for iscar.co.za, point it to 100:: and make sure to set its status to “proxied”: Manage DNS records | Cloudflare DNS docs.

Hello

I have mark it now as proxy.

Here is the redirect

I come right

Thank you very much…

Keep in mind that operator “equals” does not support wildcards, so in order for this specific rule to work correctly you need to change field URI Full to Hostname and the value to iscar.co.za (without wildcard at the front).

You don’t want to use a wildcard in this situation anyway because *iscar.co.za will match on www.iscar.co.za itself, thus creating an infinite redirect loop. :wink:

on this setting is works nice.

1 Like