Michael Treat
Michael Treat

Reputation: 519

Not able to verify squarespace domain for non-www-prefixed url in firebase

I have a domain on square space and I am trying to connect my google firebase app to it.

I was able to setup the DNS properties for the www-prefixed url and I have that one working, but when I visit the site with the www-prefix excluded I receive a firebase error saying 'site not found.'

Since I see that it's reaching firebase I've attempted to setup a redirect in firebase to just forward all requests to made to the www-excluded url directly to the www-prefixed url, but firebase needs to verify I own the www-excluded domain first.

So, Firebase instructed me to open the DNS setting in squarespace and add a txt file to verify I own the www-excluded url, which I have done ( which is also part of what I did for the www-prefixed site successfully) but firebase has not been able to verify the site.

Do I need to add additional records in order for this firebase to verify my site?

In order to get the www url working I had to add an @ A record and the www CNAME record for the www-prefixed url in order to get it to verify, but I am not sure how to get this non-prefixed url to work.

Upvotes: 7

Views: 2409

Answers (4)

Scott Morey
Scott Morey

Reputation: 11

I struggled with this as well. The A and TXT records were accepted when using @ as the host. But the CNAME record was not recognized by Firebase App Hosting. Neither the Firebase or Squarespace documentation in the links above indicate how to correct this.

The solution that worked for me (as of July 3, 2024) came from Firebase Support:

There is one important thing about creating DNS records on SquareSpace. You should create them without an apex domain in the host. For example if you want to have a domain record for _acme-challenge_random_string.yourdomain.com, you should create a record with only _acme-challenge_random_string in the host field.

Once I did this the domain finally routed to my Firebase App Hosting site.

Upvotes: 1

Uday Sravan K
Uday Sravan K

Reputation: 1454

Answer provided by Michael Treat helps to understand what could be the potential issue and gives a direction to work towards the solution. However, I had to waste quite a bit of time after domains registration changed from Google to Squarespace.

  • My domain name is simple "udaysravank.com"

  • Hosted the app on Firebase App Hosting services.

When adding the custom domain as it is provided by Firebase, Firebase was not able to verify. Says to wait for 24hours and check again. After trying many changes, finally waited for 24hours but didn't work.

It worked for me after making these 3 changes.

  1. For both TEXT AND A records, changed the host record text to just "@" though the Firebase says to add "udaysravank.com"
  2. Remove the period at the end of host text given by Firebase for CNAME record
  3. Remove the period at the end of data text given by Firebase for CNAME record

You can verify changes with G Suite Toolbox

After saving changes on Squarespace, wait for 10min and verify on Firebase. Firebase takes another 10-15min to show the status for custom domain as "connected"

Sorry about the lengthy answer, just want to give the full context.

Upvotes: 2

Yes, just leave app if app.company.com if you are using Squarespace for CNAME and data that comes from firebase.

Upvotes: 0

Michael Treat
Michael Treat

Reputation: 519

When setting up custom domains in Firebase, the tool gives the user different values and instructs the user to update their domain provider's DNS settings

The problem is that these values provided by the firebase tool may need to be adjusted to match what a given domain provider is expecting.

This doc from firebase shows what they expect from different providers and how to update the values.

https://firebase.google.com/docs/hosting/custom-domain

For Squarespace domains, they instruct the user to omit the host for all TXT records and A records rather than using what the firebase tool provides.

This enabled me to connect the non-www site as those values were able to be detected immediately ( zero propagation wait time.)

For CNAME records, Firebase instructs the user to put in the entire host www.???.com.

However in this doc from Squarespace they instruct the user to only use www for CNAME records. By omitting the rest of the host name firebase was immediately able to verify the domain and proceed to minting an SSL cert.

https://support.squarespace.com/hc/en-us/articles/215744668-Pointing-a-Squarespace-domain

Upvotes: 8

Related Questions