'To whom it may concern' isn't rude. It's a polite way of addressing your cover letter when you don't know the name, job title, or department of the person who will be reading it.
Though 'To whom it may concern' is an acceptable way to start your cover letter, here’s why you should consider alternative greetings:
If the hiring manager's information is readily available, it might make you look lazy
'To whom it may concern' is stiff and outdated. Expressions like 'Dear Hiring Manager' or 'Dear Recruiting Manager' sound more natural
You can always call the company and ask who to direct your cover letter to. This will help your application get noticed and will make you appear a more enthusiastic, proactive applicant.