I want to redirect a user after successful registration
maindomain.com to open his site in a
url will look like this
Use Rules again to do the redirect.
On Event Drupal is initializing or User has logged in add a condition if you need that (eg check that user role is not anoymous) and then add an Action of Redirect. In there use some php for the redirect path using the global variable $user (you may need some formation also if the username has spaces).
Notice that you must run this Rule after the rule that creates the subdomain. Or you can simply add the redirect action on the same domain_rules rule after the component that creates the subdomain.
i feel you have to use SSO for authentication among multiple domains, check this bakery module!