How to connect to nodered using raspberry pi hostname

The .local is typically provided by either your router or by Apple's Bonjour protocol running on the Pi.

There are doubtless several ways to get rid of it but all are relatively involved. For example, in order to make best use of Let's Encrypt, on my Pi I actually use a full domain name like pi.something.co.uk. This is set up on my router which allows such things - not all of them do.