Score:0

DNS redirecting to mantainance page during planned mantainance - what happens to google indexing?

om flag

We are planning a mantainance that could take down the services for a whole day. I would like therefore to show a mantainance page, explaining the issue and providing additional info/links. During this time, the machines will be completelly down, so I guess we am stuck to manage any redirection through the DNS.

I understand the typicaly procedure would be:

lower TTL (at least one day in advance, or 48hrs) change DNS to point to the server where the mantainance page is hosted after migration is concluded, change dns to new , final, server change TTL back to normal now, my question is on point #2: What happens to google when we do this? Should we redirect to a new domain (eg: mantainance.example.com), or point the basic domain to the new server? I belive we should also return a 503 header to tell google we are under mantainance. where is this done?

thanks

I looked on existing thread but couldnt find anything this specific

diya avatar
la flag
I would also look on the Webmasters Stack Exchange.
Score:0
la flag

There is no guarantee that changes in DNS records will be picked up by all clients within the span of of the DNS TTL you set.

Ideally you use your load balancer to completely transparently show the maintenance page, rather than your normal web server(s) without any DNS changes.

In the absence of a loadbalancer:

If you can, rather than changing the DNS record and the IP-addresses for example.com and www.example.com consider temporarily assigning the current public IP-address used by your production server to a different server for the duration of you maintenance.

That switch is completely in your control and normally much quicker to effect than DNS changes.

When you can't ; don't hesitate to change the DNS.


On the web server that temporarily hosts example.com and www.example.com you can:

  • Configure the webserver to return a transient error code for all requested resources and pages. So rather than a HTTP status 200, return a custom HTTP 503 "Service Unavailable" error page; ideally with a header Retry-after: time-stamp-when-maintenance-is-complete and a nicely formatted page telling the same to human visitors.

That makes it clear to all browsers, indexers and visitors that the current content is not your actual website.

  • Or alternatively configure a temporary catch-all redirect to for example maintenance.example.com ; the HTTP 302 response and temporary redirects shouldn't be cached by browsers and shouldn't be indexed.
    After maintenance, remove that redirect and you should be good

Either is configured in your webserver ; the syntax of course depends on the web server:

For apache httpd, create a subdirectory where you store your custom 503 maintenance page, css, images etc and exclude that subdirectory from the overall maintenance and the use a rewrite rule to trigger the 503 response for everything else: (untested)

<VirtualHost *:80>
  ServerName example.com
  ServerAlias www.example.com
  Alias "/planned/maintenance/" "/path/to/maintenance-content/"  
  ErrorDocument 503 /planned/maintenance/index.html

  RewriteEngine On
  RewriteCond %{REQUEST_URI} !^/planned/maintenance/
  RewriteRule .* - [R=503,L]
<VirtualHost>
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.