if you talk about PDF export for your project, export your InDesign document to two different PDFs.
The one for print ( version 1 ) with one of the PDF/X standards, either PDF/X-1a or PDF/X-4 (check what the printers want) and the one for online purposes only ( version 2 ) like that:
If you need interactive elements in your online version, do a third PDF ( version 3 ) with InDesign's PDF export (Interactive) and exchange all the pages with the one from version 2 so that the interactive elements remain and you have still all control over all other aspects PDF for Print will give you. You do the exchange of pages in Acrobat Pro DC and you save the document to another name, let's call it version 4.
That's just all in a nutshell.
Note: if you need a version that must be printed in offset, create the elements in InDesign that should be printed with ink black with a CMYK black. All other elements could stay in RGB and will be converted to CMYK either when you export to PDF or will be converted at the printers if you do an export to PDF/X-4 without any color conversion. But please check the details with your printers.
( ACP )