In the settings readings option,

I changed the it from http://domain.com to

http://www.domain.com in both the text box.

After that I am not able to access the WP dashboard.