I don’t usually discuss genealogy databases on Ancestry.com. That’s because they are a fee based service and that means that not everyone would be able to see those records. Ancestry does have some free databases but they are not easy to find.
Ancestry recently added indexes to approx. 10 million vital records for New York City (1862 – 1948). These records came from the New York City Department of Records – Municipal Archives. As part of the agreement with the City, Ancestry had to make the records available for free. Start at this New York page and scroll to the bottom and search the births, marriages and deaths separately. There are approx. 800 thousand birth records (1878 – 1909), 5 million marriages (1866 – 1937) and 4.7 million death records (1862 – 1948). If you find a person in the index that you want to order the certificate for, then Ancestry includes a link to NYC Archives webpage where you can order a copy of the certificate for $15.
A majority of immigrants to the US came through New York City. Some families would settled in New York City for generations. Other families would remain in NYC for a short time before moving on to other parts of the US. That’s why you should especially check for immigrant families in the NYC records.
It is important to note that before January 1898 New York City only included the Borough of Manhattan (NY County). The other four Boroughs (Bronx, Queens, Brooklyn & Staten Island) will not be included in these records before 1898.