Family trees
When entering anyone's name in a family tree, enter their last name at birth (in the case of women, often called a "maiden name"). Using birth names in family trees ties people to their original families, ensures that married people's pre-marriage names are recorded, and maintains consistency in your tree among single, people who married once, and people who married more than once. If you don't know someone's last name at birth, leave their last name blank.
In all cases (including where someone married and didn't change their last name, when their name changed when they married, and when two people of the same gender married), enter both partners' last names as their birth names.
DNA
When registering your DNA test, the name you enter does not affect your results, and you can change it at any time through your DNA settings page. It doesn't matter whether you enter your name at birth or your married name. Most people enter their current legal names.
Ancestry® account
The name you enter for your Ancestry account doesn't affect your family tree or DNA results. You should use your current name for your Ancestry account. Change the name on your account from your Account settings page.
Searches
When searching for records, search with the name the person would have used during the time period you're looking in. For example, if you're looking for documents that include your great-grandmother as a child, use her last name at birth. If she married and you're looking for information about her later in life, use her married name.