The more interesting question is: even if you could, why would you patent it?
Patents are worthless for most startups. They are expensive, and you don't have the resources to enforce them.
Unless your business model is based on a single technology innovation, you are better off spending your time and money on finding product-market fit. Imagine the irony of having a patent on something nobody wants.
You could, however, copyright the ultimate execution of your code/design, meaning that somebody wouldn't legally be able host a site that looked and functioned exactly as yours did. The problem is, there's really no way to tell if somebody copied your source and then modified it.
Imagine if Yahoo were able to patent search technology. We wouldn't have Google, and websites would have to pay to implement search indexes on their own internal sites.
The good thing is that all of this promotes competition and moves the web further forward in its evolution. I, personally, wouldn't have it any other way and I'm praying for the day that they ban patents on pharma.
Since you don't own the technology, you can't really patent it.
You can patent any idea but it much the first idea. use http://patents.google.com to make a patent search and find whether anyone before patented the same idea. Of course you may think you are the first but you will never know what the person besides you is thinking about. So, first make a search and then you can submit it for patents.
The one step answer for your question is you can patent any kind of idea.
But I am not sure that I understood your question :(