Redirect Rule from naked domain to www. not working

Hi. I have setup a redirect rule so that if I type a naked domain, it goes to the www. version:

IF
hostname equals adrigiraldo.com
THEN
static concat(“https://www.adrigiraldo.com”, http.request.uri.path) 301

But it does nothing. I even added https://adrigiraldo.com and http://adrigiraldo.com but still nothing.

It looks like this:

Any idea what could be the problem?

2 things…

  1. You need a DNS record for adrigiraldo.com. Set a proxied dummy DNS record for @ pointing to A 192.0.2.1 or AAAA 100::

  2. You only need hostname equals adrigiraldo.com, the http:// and https:// are not part of the hostname (see the example text below the box) and the first one would redirect for both schemas anyway.

[add] And with the concat() expression, the redirect type should be “Dynamic”, not “Static”.

Thanks, I am not an expert on DNS records, so let me see if I got you.

You are telling me to create either an:
A record that points to 192.0.2.1
OR
AAAA record that points to 100::

What is the advantages of using A vs AAAA?

You can use either. Some people prefer the AAAA 100:: as it stands out and reminds you of the redirect. Others don’t feel comfortable with IPv6 addresses so use the A record instead.

Thanks, it is working now! :smiley:

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