When it comes to signing up for web hosting. Some web hosts may require a long term commitment. When signing up for a new web hosting account. The web hosting provider may not provide any information upfront that you have to provide 15 days, 30 days, or even 3 months notice in advance before you can close your account with them. Most web hosting providers will let you cancel anytime without any notice required.
The cancellation policy of the web host can typically be found in the Acceptable Usage Policy (AUP) or Terms of Use (TOS) page. Some web hosts may have a web page dedicated to describing the step to canceling your account with them. Most web hosts make the account cancellation process simple and pain free. Other web hosts will make you jump through various hurdles before letting your account close.
Most of the time when buy a shared web hosting account. The cancellation policy should be straight forward and simple. There should be no advance notice required.
With virtual private servers (VPS) depending on the provider. They may require a 15 day to 30 day notice in advance before they let you cancel the VPS. The same applies to dedicated servers and colocation service providers.
Before signing up with your web hosting provider. You should ask them what their cancellation policy is. You should always know the cancellation policy and whether or not advance notice is required before you sign up with any web hosting provider.