[Solved] Siteground staging dns

Hi, I’m having difficulty with my staging site, I think I have followed the manual correctly but adding staging2 to the dns, does not seem to work, I have tried in two different ways and waited a day for the setting to apply but still seems like I’m doing something wrong, could you help me please? Screenshot by Lightshot

@MoreHelp

Hi,

If your site is using Cloudflare directly, there’s this limitation: you cannot proxy sub-subdomains. So your URL would need to be sub.example.com, and not sub.sub.example.com.

Your staging subdomain seems to have a www before it, in which case it won’t work.

In case have Cloudflare through Siteground (partner setup), they add the www as part of their integration. You would need to contact their support.

3 Likes

We can see where the redirect is happening when using cURL: < x-redirect-by: WordPress

WordPress is redirecting staging2.antoniniepartners-insurance.com over to www.staging2.antoniniepartners-insurance.com, but can’t be resolved as the record does not exist in your DNS:

GET / HTTP/2
Host: staging2.antoniniepartners-insurance.com
User-Agent: curl/7.64.1
Accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
< HTTP/2 301
< date: Tue, 06 Apr 2021 14:20:33 GMT
< content-type: text/html; charset=UTF-8
< set-cookie: __cfduid=dad50434f339c920e84c5b2370c852ede1617718830; expires=Thu, 06-May-21 14:20:30 GMT; path=/; domain=.antoniniepartners-insurance.com; HttpOnly; SameSite=Lax; Secure
< expires: Thu, 19 Nov 1981 08:52:00 GMT
< cache-control: no-store, no-cache, must-revalidate
< pragma: no-cache
< x-redirect-by: WordPress
< set-cookie: PHPSESSID=5cdb390bb880bb4fd05e5b180f40a2b9; path=/
< content-security-policy: upgrade-insecure-requests
< location: https://www.staging2.antoniniepartners-insurance.com/
< x-httpd: 1
< host-header: 6b7412fb82ca5edfd0917e3957f05d89
< x-proxy-cache: MISS
< x-proxy-cache-info: d NC:000000 UP:SKIP_CACHE_SET_COOKIE
< cf-cache-status: DYNAMIC

$ curl -svo /dev/null https://www.staging2.antoniniepartners-insurance.com
* Could not resolve host: www.staging2.antoniniepartners-insurance.com
* Closing connection 0

Also, keep in mind that the default Universal SSL certificate included with every plan only covers the 1st level subdomain such as www.example.com. In this case, you will need to order the Advanced Certificate Manager since your staging sub-domain www.staging2.antoniniepartners-insurance.com would be considered a 2nd level subdomain.

In conclusion, make sure you have a DNS record that resolves to your staging site and ensure you have the proper SSL cert in Cloudflare to cover it.

2 Likes

Done, thanks! That worked for me,

1 Like

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