Dec 04, 2008, 12:47 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Search via SMF or Google: modx forums all of modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: SEO Friendly Site Maintenance Page - 503 HTTP response  (Read 351 times)
0 Members and 1 Guest are viewing this topic.
bmilton
Jr. Member
*
Posts: 20



WWW
« on: Sep 30, 2008, 03:38 PM »

Hi guys,

SEO savvy folks know that bad things can happen if a search bot crawls your site while it is down.  Having an important page replaced in the index with an error page is temporary death to search rankings.

I noticed in "Tools\Configuration" that ModX has a config item called "Site Status".  When the site is set to "Offline", it displays a text message when anyone hits the site.

Using the text message generates a 503
  • When ModX is configured to display a generic text message via the "site unavailable message", it appears that ModX also reports a 503 HTTP status for any site request.
  • This is exactly what I want as it is the correct code to indicate a site under maintenance and lets the search engine bot know to check back rather than index the temporary page.
Setting a custom maintenance page generates a 301
  • Displaying a generic text message isn't very appealing and doesn't stick with the site theme, so I wanted to have a custom maintenance page.
  • I noticed that in the configuration settings there is an option to set the "Site unavailable page" to a specific doc id.  This looks like a great solution so I created a page based off my default template to indicate a Maintenance status and set this option to point to it.
  • However, now it appears that when the site is offline any requests actually return a 301instead of a 503.  A 301 indicates that something has permanently moved, so I really don't want the search bot to see that when it hits the site during my maintenance.

I'd really love to be able to use the ModX config manager to handle this without worrying about any negative consequences.
Is there a way to modify the code such that a 503 is reported when using a custom "site unavailable page"?  Or, it would also be fine if search bots are given the 503 and human visitors get the 301.

I think that this would be another great SEO selling feature for ModX if updated a bit.  The alternative is much more of a pain...creating a separate error page outside of ModX and copying over a custom .htaccess using Mod rewrites to get the job done.

-Brian
Logged

Brian Milton
Owner/Campaign Manager

SEO conductor
- We offer comprehensive SEO campaign management.
By orchestrating all aspects of your website, we provide a coordinated and quality effort that ensures success.
BobRay
Coding Team
*
Posts: 1,810



WWW
« Reply #1 on: Sep 30, 2008, 05:11 PM »

Have you tried checking the site from another browser where you're not logged in in the MODx Manager? 

The checkSiteStatus() function in /manager/includes/document.parser.class.inc.php behaves differently when you're logged in to the Manager.

It looks like the function returns false (which triggers the 503 response) only if the site is offline AND you're not logged into the Manager. In theory, any bot should get the 503 response when the site is offline.
Logged

MODx info for newbies: http://bobsguides.com/MODx.html
bmilton
Jr. Member
*
Posts: 20



WWW
« Reply #2 on: Sep 30, 2008, 06:08 PM »

I checked into this some more...

I have tested it in a separate browser that is not logged into the manager.  I've discovered that the SEO Strict URLs plug-in is affecting the results.
If I disable the strict URLs plug-in, then I get the 503 status as desired and the custom page is displayed.

When I enable the plug-in, I get a 301 and the custom page is displayed.

I'm using the following tool to check the response: http://www.seoconsultants.com/tools/headers.asp#results

-Brian
Logged

Brian Milton
Owner/Campaign Manager

SEO conductor
- We offer comprehensive SEO campaign management.
By orchestrating all aspects of your website, we provide a coordinated and quality effort that ensures success.
OpenGeek
MODx Co-Founder
Foundation
*
Posts: 5,054


looking a little more like my avatar again...


WWW
« Reply #3 on: Sep 30, 2008, 07:20 PM »

I have tested it in a separate browser that is not logged into the manager.  I've discovered that the SEO Strict URLs plug-in is affecting the results.
If I disable the strict URLs plug-in, then I get the 503 status as desired and the custom page is displayed.

When I enable the plug-in, I get a 301 and the custom page is displayed.
I'd suggest posting this information in the SEO Strict URL's support thread to notify the developer or see if anyone else has had this problem.
Logged

Jason Coward
MODx Co-Founder
xPDO Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
The spirit of a warrior is not geared to indulging and complaining, nor is it geared to winning or losing. The spirit of the warrior is geared only to struggle, and every struggle is a warrior's last battle on earth. Thus the outcome matters very little to him. In his last battle on earth a warrior lets his spirit flow free and clear. And as he wages his battle, knowing that his intent is impeccable, a warrior laughs and laughs.
  — don Juan Matus
bmilton
Jr. Member
*
Posts: 20



WWW
« Reply #4 on: Sep 30, 2008, 07:31 PM »

Yeah...will do.

-Brian
Logged

Brian Milton
Owner/Campaign Manager

SEO conductor
- We offer comprehensive SEO campaign management.
By orchestrating all aspects of your website, we provide a coordinated and quality effort that ensures success.
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF 1.1.4 | SMF © 2005, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!