Title: DOM Parser Failed
Last modified: July 1, 2019

---

# DOM Parser Failed

 *  [luanfernandes](https://wordpress.org/support/users/luanfernandes/)
 * (@luanfernandes)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/dom-parser-failed/)
 * Hi, I’m trying to figure out why my DOM Parser is failing.
 * July 1, 2019 7:55 am [Error] DOM parser failed. URL:/biography/, Request:a:0:{}(
   Memory:13.39Mb CPU:0.00% )
 * This is one example of what’s showing inside the logs, it shows in every page,
   including the homepage (“URL:/”).
 * I’m 100% sure it’s not redirecting (tested with chrome dev tools network tab 
   and it’s a 200 response).
 * I looked into your website help section but it only says to confirm it’s a redirect
   issue. There’s no information on what to do in case it’s not.

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Contributor [Fred](https://wordpress.org/support/users/fredawd/)
 * (@fredawd)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/dom-parser-failed/#post-11693863)
 * Is caching completely failing? What is the URL of your site? You mat also see
   if increasing Maximum size for DOM parser buffer helps.
 *  Thread Starter [luanfernandes](https://wordpress.org/support/users/luanfernandes/)
 * (@luanfernandes)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/dom-parser-failed/#post-11693923)
 * I temporally switched to wp rocket because their plugin is working. You can check
   here:
    [https://newtest.luanfernandes.com](https://newtest.luanfernandes.com)
 * I’m considering changing to swift pro but first I need to be sure that it’s going
   to work.
 *  Plugin Contributor [Fred](https://wordpress.org/support/users/fredawd/)
 * (@fredawd)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/dom-parser-failed/#post-11694095)
 * Okay, but you didn’t answer my questions or try to increase max. size for DOM
   parser. Anyway, Swift Performance Pro comes with a 14-day money back guarantee,
   so no risk and also with excellent support 🙂
 *  Thread Starter [luanfernandes](https://wordpress.org/support/users/luanfernandes/)
 * (@luanfernandes)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/dom-parser-failed/#post-11694170)
 * It is working. I think my problem was with Apache+NGINX.. I changed to NGINX 
   only and now it seems to be working (I increased the DOM parser max size as well,
   just in case).
 * Do you have any tutorial on how to setup NGINX with you guys? I have a .conf 
   for wp-rocket files (using try_files with the right path naming) and I was wondering
   if you happen to have something similar.
 *  Plugin Contributor [Fred](https://wordpress.org/support/users/fredawd/)
 * (@fredawd)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/dom-parser-failed/#post-11695946)
 * This [guide](https://swteplugins.com/docs/nginx-configuration-with-swift/) may
   useful.
 *  Thread Starter [luanfernandes](https://wordpress.org/support/users/luanfernandes/)
 * (@luanfernandes)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/dom-parser-failed/#post-11696877)
 * Yes! It helps a lot. I found something weird, but I’m not a coder though:
 * ###BEGIN Swift Performance###
    set $swift_cache 1; if ($request_method = POST){
   set $swift_cache 0; }
 * if ($args != ”){
    set $swift_cache 0; }
 * if ($http_cookie ~* “wordpress_logged_in”) {
    set $swift_cache 0; }
 * if ($request_uri ~ ^/wp-content/cache/swift-performance/([^/]*)/assetproxy) {
   
   set $swift_cache 0; }
 * if (!-f “/home/runcloud/webapps/wordpress/wp-content/cache/swift-performance//
   $http_host/$request_uri/desktop/unauthenticated/index.html”) {
    set $swift_cache
   0; }
 * set $swift_mobile_cache 1;
    if (!-f “/home/runcloud/webapps/wordpress/wp-content/
   cache/swift-performance//$http_host/$request_uri/mobile/unauthenticated/index.
   html”) { set $swift_mobile_cache 0; }
 * if ($http_user_agent ~* (Mobile|Android|Silk|Kindle|BlackBerry|Opera+Mini|Opera
   +Mobi)) {
    set $swift_cache “{$swift_cache}{$swift_mobile_cache}”; }
 * **if ($swift_cache = 11){
    rewrite .\* /wp-content/cache/swift-performance/$http_host/
   $request_uri/mobile/unauthenticated/index.html last; }
 * if ($swift_cache = 1){
    rewrite .* /wp-content/cache/swift-performance/$http_host/
   $request_uri/desktop/unauthenticated/index.html last; } ###END Swift Performance###
 * Is it supposed to be 11 there?
    -  This reply was modified 6 years, 11 months ago by [luanfernandes](https://wordpress.org/support/users/luanfernandes/).

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘DOM Parser Failed’ is closed to new replies.

 * ![](https://ps.w.org/swift-performance-lite/assets/icon-256x256.jpg?rev=2388229)
 * [Swift Performance Lite](https://wordpress.org/plugins/swift-performance-lite/)
 * [Support Threads](https://wordpress.org/support/plugin/swift-performance-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/swift-performance-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/swift-performance-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/swift-performance-lite/reviews/)

## Tags

 * [dom](https://wordpress.org/support/topic-tag/dom/)
 * [parser](https://wordpress.org/support/topic-tag/parser/)

 * 6 replies
 * 2 participants
 * Last reply from: [luanfernandes](https://wordpress.org/support/users/luanfernandes/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/dom-parser-failed/#post-11696877)
 * Status: not resolved