403, 404, 500 or Internal Error When Adding Pages, Items or Categories

If you get a sporadic 403 Forbidden, 404 File Not Found or 500 Internal error when adding pages, items or categories to the system (ie. it's only happening when you edit some entries), it's very possible that the issue is due to security software on your server.

Many web servers use security programs that help to stop potential hackers. While it does help to decrease the amount of hacks on the server, it can also affect what you enter as descriptions on a site. Certain words and phrases are 'triggers' to the server, and if you enter these phrases, you will receive an error message.

The Solution

To correct this error, scan your text - especially descriptions - for phrases that might be query or server commands, and replace them with other text. Some common examples include:

SELECT ... FROM
DELETE ... FROM
INSERT ... INTO
WRITE ... TO
UPDATE ... SET
CREATE ... TABLE
ALTER ... TABLE
DROP ... TABLE

But keep in mind that your server may have additional phrases that are security triggers. Ask your web host if they use security software, and if so, what phrases are triggers.

Example

Imagine you are using the description:

"We have many great styles available! Select a shirt from our collection with any color or pattern, and we'll customize it for you for free!"

That description may result in an error page, because it contains one of the trigger phrases Select ... from. If you change it to '... Pick a shirt from ...', it's much more likely to go through.

You might also want to check with your web host to see if the checks can be removed. However, most hosts will not remove those phrase checks, and you'll be decreasing your security if you do.

What if I can't figure out what phrase is causing the problem?

If your host hasn't given you a list of the phrases that could be stopping your text from going through, and you've checked the known phrases listed above and still can't find the issue, the only way to determine what's causing it is to systematically check text.

  • Enter the description that is not going through
  • When you get the error, use the browser's back button to go back to the admin page.
  • Remove one sentence.
  • Try posting again.
  • If you get the error once more, repeat the process until the page saves.
  • At that point, you know the issue is with the last sentence you removed.
  • Please note that sometimes HTML tags can be the culprit! If you can't find the text that isn't going through, try changing the HTML tags (removing classes, IDs and styles) and see if that helps.