Skip to content

Commit de26933

Browse files
Add Google Search Console verification to the apex TXT record
Google domain-property verification needs a google-site-verification TXT at the apex. Route 53 allows only one TXT record-set per name, so the string is appended to the existing apex record alongside the SPF policy rather than as a second record (which Route 53 would reject).
1 parent 0199c89 commit de26933

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

cdk/lib/email-stack.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,17 @@ export class StormdeckEmailStack extends Stack {
4848
identity: ses.Identity.publicHostedZone(zone),
4949
});
5050

51-
// SPF — authorize Amazon SES to send for the domain.
51+
// Apex TXT record set. Route 53 allows only one TXT record-set per name, so
52+
// the SPF policy (authorizing Amazon SES to send) and the Google Search
53+
// Console domain-verification string share this single record. (Logical id
54+
// stays 'Spf' so CFN updates the values in place, not replacing the record.)
5255
new route53.TxtRecord(this, 'Spf', {
5356
zone,
5457
recordName: DOMAIN,
55-
values: ['v=spf1 include:amazonses.com ~all'],
58+
values: [
59+
'v=spf1 include:amazonses.com ~all',
60+
'google-site-verification=bEdN5MsLRKcHmi5xlGSQRal-T7iLtQnR9LKO9EkAvFQ',
61+
],
5662
});
5763

5864
// DMARC — monitor mode to start; tighten after watching reports.

0 commit comments

Comments
 (0)