Yes, buying the web site is an expense. You can deduct whatever you paid for it. There is the question of whether you can expense it all in the year you bought it or whether you can or must depreciate it over time. If the price was modest you can take a section 179 deduction and deduct the whole thing in one year. (I believe the limit on section 179 is $250,000.) But if the cost was high compared to your income, you might prefer to depreciate it over time. This page, https://www.loopholelewy.com/loopholelewy/02-business-deductions/depreciation-09-recovery-periods.htm, lists the depreciation period for various types of item. I recall in the past seeing such charts that included "computer software", I think as 5 year property, but I don't see that on this list. Not sure if that's because the list is incomplete or because the rules have changed. Anyway, I'm not sure where a web site would be classified. It's not "computer hardware and peripherals", at least, you're probably not buying the server, you're just buying a domain name, content, and maybe some software.
If you are making money from the web site, than this income is taxable business income. It must be declared on your schedule C (you said you're a sole proprietor so you should be filing a schedule C) and you will pay taxes on the income.