Can I apply for a patent for building my own website?

Website programs belong to works, not products. You can only apply for computer software copyright, not patent!

If your website is developed by yourself, you can apply for the copyright of computer software! But if someone else developed it, you have no right to apply. If it is secondary development, you can apply for the secondary development part, but you can't own all the rights of the program, and you must get the consent of the original program developer before you can apply.