So my friend and I are writing a story about best friends who find out they're twins, and they find out by a dna test like the ones on ancestry.com. We don't know whether we can use ancestry's name legally without any permission or something, but is ancestry.com copyrighted?
The name isn't protected by copyright. It is protected by trademark law. As a general rule, you can make reference to it without worrying too much. If you cast the name in a bad light, they might respond to it (if the work becomes popular) even if you're withing your rights. Don't use it in the manner of a trademark (for example, don't put it in the title of your book or something) and you should be OK, generally speaking.