Subdomain multisite gives 404 on sub sites

I used a one click install to install wordpress and then converted it into a sub domain multisite. I have made the required changes to the wp-config and htaccess file.
The main site works absolutely fine.
When I try to add another site, it shows that the site has been successfully added. But the address shows a page that says no content here and gives a 404 error.(These are both generic pages similar to what my server shows on any random subdomain)