"This site can't be reached" and ERR_INVALID_RESPONSE error when accessing a SharePoint site

Symptoms

When you try to access a SharePoint site through Microsoft Teams or your web browser, you receive the following error message:

This site can't be reached
The webpage at (URL) might be temporarily down or it may have moved permanently to a new web address.
ERR_INVALID_RESPONSE

Cause

The homepage of the SharePoint site might have been deleted.

Resolution

Check whether the homepage is in the recycle bin or site collection recycle bin. For more information about how to recover files from those locations, see Restore items in the recycle bin that were deleted from SharePoint or Teams.

If the homepage isn't in the recycle bin or site collection recycle bin, do either of the following.

Make an existing page the homepage

  1. Go to the Site Pages library.

    Example Site Pages library URL: https://contoso.sharepoint.com/SitePages/Forms/ByAuthor.aspx

  2. Select the three vertical dots after the name of the page that you want to use as the homepage.

  3. Select Make homepage.

Create a new homepage

  1. Go to the Site Pages library.
  2. Select New > Site page.
  3. Enter the page content.
  4. Select Save as draft > Publish.
  5. Go back to the Site Pages library, and select the three vertical dots after the page name.
  6. Select Make homepage.