Why such a document is needed even for small projects? There are two major reasons.
Reason number one: proper understanding of the site’s functionality will determine the technology used to build it.
Reason number two is communication - it’s very important that both sides - the client and the developers know exactly what they are building and why, because this will eliminate any surprises in that regard. And remember, surprises in web development cost money.
The functional specification should be the base on which the project is quoted and it should be included as part of the contract.
With the functional specification out of the way, it's time to move to the technical one. Arguably, this document is, in most cases, for internal usage of the developers, since it tackles the technological aspects of the project which wouldn’t be very useful for most clients (and often completely out of their level of expertise). There are exceptions to that of course. If the client is providing their own or third party solutions that will need to be implemented, it might be useful or even necessary to include them in writing the specification, but in most cases it isn’t required.
The technical specification will include information on things like the content management system used for the project, front-end solutions, third party applications, optimisation avenues and hosting parameters. It’s width and breadth will be determined by the functional specification for the most part, but also by the experience and judgement of the development team