Port 631/TCP is where CUPS, the printing system of Linux and macOS, listens with IPP (Internet Printing Protocol, RFC 8010/8011). The same port serves the web interface at http://localhost:631. Network printers usually speak IPP on 631 as well.
By default CUPS is reachable locally only. Sharing to the LAN is done with Listen in /etc/cups/cupsd.conf or cupsctl --share-printers; remote admin access only where needed (--remote-admin). Do not open it to the internet. If you do not need printer sharing, also disable cups-browsed.
Typical: accessing it by hostname gives Bad Request – set ServerAlias – or 403 Forbidden because cupsd.conf does not allow access from that network.
Check
lpstat -h printer.example.com:631 -p