I wanted to know if it's ok to use .gov and .edu sites in research?
Whether websites will be acceptable for a research paper assignment depends on the requirements of the assignment. If you are doing a project where you have to look at clinical guidelines, for example, the National Guidelines Clearinghouse website would be appropriate to use.
Government (.gov) and education (.edu) websites are generally considered reliable websites, but you would want to check in with your assignment parameters to see if websites are acceptable, or if you can only include journal articles, for example, in your references. The attached link has information on evaluating websites in general.