Error hosting facebook app on 1and1

facebook error

I was creating a facebook app and trying to host the canvas URL on my 1and1 hosting account.  Even though I could browse directly to the index.html and it would render fine, I would get an error when trying to browse to it via

“Method Not Allowed.  The requested method POST is not allowed for the URL …”

Although I have not encountered this problem on other web hosts, it appears that 1and1’s web server is set up a little differently.  When you browse to the canvas page via, facebook sends some POST variables to your site.  1and1 doesn’t allow an html file to render when POST variables are sent.

A simple workaround is to rename your index.html to index.php. That makes 1and1 think that the POST variables are expected.

42 thoughts on “Error hosting facebook app on 1and1

  1. Jason

    Wow! Nice find, Karl.
    Despite frustrations with them in the past, I’ve been using and recommending 1and1 for years. No provider is perfect and workarounds for most issues with 1and1 exist. The trick is finding them.

  2. Kathryn

    Brilliant thank you. I thought I was doing well to get this far, only to receive the POST error which made my heart sink. Much as I like a lot about 1&1, things like this are very frustrating.

  3. Venita

    God bless you! I’ve been Googling for over an hour to resolve this and even contacted customer support (obviously with no luck). Thank you, thank you! 🙂

  4. Yahea

    Oh God, this post is a life saver. This problem has been driving me nuts for the past few days. Thank you so much!

  5. Journojulz

    Help – i am not sure which bit i need to change to .php

    I tried changing is it the app.htm to app.php and now it says:
    Error 403 – Forbidden
    You tried to access a document for which you don’t have privileges

    I agree with the above sentiments – this is my only real complaint with 1and1, usually great.

  6. Mal

    fantastic, thanks for this. first time using a new client’s site to host FB content, and this was a surprise. Google’d and this was the first result. perfect solution, thanks,

  7. Susan

    I have a slightly different problem. The domain I use also has a wordpress installation. This folder therefore already has an index.php file. I added plain html files to this folder and am getting this same error message.


    1. karl.kranich Post author

      Why not put the facebook app’s index file in a subfolder? As long as the subfolder doesn’t have a name that matches one of your WordPress page names, it will work fine, and then you can call the file index.php.


  8. SJL

    I don’t normally ever comment on these kind of forums, but after much head-banging, you have just provided me with the easiest fix ever, so I just wanted to write to say I love you!!!

  9. Craig

    Thanks. First post I came to, so managed to solve the problem in about 60 sec, otherwise may have been longer!


Leave a Reply

Your email address will not be published. Required fields are marked *