From a US standpoint, this is what CCH Tax Research states:
CCH-EXP, CCH Federal Tax Service çG:6.363[4], Website Domain Names
Website Domain Names
A domain name serves as the website's address on the internet by providing a coded series of numbers that allows computers to locate the site. While domain names are similar to trademarks and tradenames, they probably do not qualify as an amortizable Code Sec. 197 intangible; domain names consist only of words without any graphic elements, for instance, and a word that is too common to trademark can still be a domain name (see çG:22.41[10] for discussion of amortization of trademarks).
[a] Registering a name.
Original domain names are available from an internet registrar at a nominal fee. Registration fees must be renewed every two years; thus, each fee can probably be capitalized over its two-year useful life.
Purchasing a name.
Many domain names must be purchased from third parties who previously registered them but no longer need them for their own businesses, or who register names and resell them at a profit. These costs probably must be capitalized because the name will have a useful life of more than one year (see çG:3.62[1] for discussion of the one year rule). The costs probably cannot be amortized because of the difficulty of establishing the name's useful life.
So... according to the above, registration or renewal fees should be capitalized (and I assume amortized over registration period or taken as expense if on cash basis). Any cost of purchasing a domain name must be capitalized and cannot be amortized. Upon sale of a domain name, your purchase cost becomes your Cost of Goods Sold.
Taxable income = Sales Price Less Cost of Goods Sold.
Note, however, that there seems to be no definitive ruling on this area as yet and this is simply their interpretation.