2013-02-07 16 views
22

Ho una serie di sottodomini definiti sul mio dominio come questo:Il * in un record CNAME ha la priorità su sottodomini espliciti?

CNAME sub1.example.com -> sub1.herokuapp.com 
CNAME sub2.example.com -> sub2.appspot.com 
CNAME www.example.com -> example.herokuapp.com 

ora vorrei aggiungere CNAME *.example.com -> example.herokuapp.com per catturare le persone che hanno messo in troppi WWWs o tipo in altri sottodomini mancanti. Ma il * avrà la priorità sui sottodomini esplicitamente definiti o i sottodomini continueranno a funzionare come previsto?

Sto utilizzando Route53 se fa la differenza.

risposta

43

I caratteri jolly corrispondono solo ai record che non sono definiti nella zona.

Vedi RFC 1912, si parla MX record qui, ma lo stesso vale per CNAME s:

2.7 Wildcard records 

Wildcard MXs are useful mostly for non IP-connected sites. A common 
mistake is thinking that a wildcard MX for a zone will apply to all 
hosts in the zone. A wildcard MX will apply only to names in the 
zone which aren't listed in the DNS at all. e.g., 

     podunk.xx.  IN  NS  ns1 
         IN  NS  ns2 
     mary   IN  A  1.2.3.4 
     *.podunk.xx. IN  MX  5 sue 

Mail for mary.podunk.xx will be sent to itself for delivery. Only 
mail for jane.podunk.xx or any hosts you don't see above will be sent 
to the MX. For most Internet sites, wildcard MX records are not 
useful. You need to put explicit MX records on every host. 
+2

+1 per fare riferimento alla RFC. – johankj

+3

Beh, sì. I riferimenti RFC sono argomentatori di SO. –

7

No, i sottodomini definiti devono avere la priorità su un carattere jolly.

Problemi correlati