These are general and not at all meant to be comprehensive, but the following list may be of some use to you. Without refining what specific topic you're looking for, it's hard to make a proper suggestion.
(1) Google Books/Google Scholar
(2) Archive.org
(3) Project Gutenburg
(4) Paul Halsall's Internet History Sourcebook
(5) The Online Medieval & Classical Library
(6) Here's a good page on how to use online primary sources.
(8) Historynet
(9) The Labyrinth
(10) The Smithsonian
(11) The British Library
(13) The Vatican Library
(15) Canadian Library and Archives
(16) The National Archives (U.S.)
(17) The National Archives (UK)
(18) The Avalon Project
(19) Life Magazine Photos
(20) Museum of Modern Art
(21) Louvre
(22) The British Museum
(23) EuroDocs
In addition, most major universities have some primary documents up on their respective library websites. Oxford, Harvard, Yale, and Cambridge are good examples.
Hope this helps a little. Happy reading!
This depends almost entirely on your field of inquiry. Did you have a specific subject in mind?
Wilson Center (http://www.wilsoncenter.org/) is an excellent website to use for whatever modern international documents you are after, mostly concentrating on Cold War and American topics.
Marxists.org (https://www.marxists.org/) deals with Communist history and you can access speeches and documents from the Soviet Union, Warsaw Pact and Communist China.
Penelope (http://penelope.uchicago.edu/Thayer/E/Roman/Texts/home.html) contains classical sources including original Latin and Greek.