In this situation, humans have used ships to colonize other worlds very distant from ours but still maintain a interplanetary equivalent of our World Wide Web. These future humans have not yet discovered any new forms of communication. These worlds are separated by many other large spatial bodies which would interfere/block typical radio signals. My question is, what other forms of direct communication could they use, or would they have to use relay station to amplify the message and go around obstacles? If relay stations are necessary, how would they set them up so as to not be cut off by the differing orbits of the obstacles?
Right now we don't know any better form of communication than electromagnetic waves. It can be radio, optical, terahertz, microwave - whichever suits our needs the best.
It might be that your interplanetary obstacles are impenetrable to some forms of radiation, but transparent to others. That would make your task easier, you just need to select appropriate wavelength for your communication. If the obstacles are totally blocking, then you need to use relay stations, which could be either stationary ones on the surface of these celestial bodies, or orbiting satellites. With enough relay stations, communication will be reliable.
Other issue that will come up is signal delay - even on clear day, one way transmission between the planets can take hours. This would make WWW-like experience problematic.
There's currently no means of transmission that would be suitable for useful turnarounds of information on the interstellar net.
However there are at least two options for communication that come to mind that might be feasible down the line.
One comes with the territory of interstellar travel itself, simply, you take a copy of the current state of your network to a hub station nearer your users. They can interact with that local copy (with timestamps for when the information was last updated) and periodically a new ship or burst-transmission from another star system can update the data.
You'd likely partition this form of network, local users don't care about the ability to buy etsy products from other star systems due to the expense and time of shipping.
It'd be high-bandwidth but low frequency. lots of information but rarely.
The other, more real-time option, closer to science fiction, might be to apply Quantum Entanglement.
Essentially you pair two atoms together via entanglement and the distance ceases to be relevant. what you do to one will affect the other.
This doesn't allow much data bandwidth, but you can theoretically use large amounts of these entangled pairs to encode data.
My understand of the science is pretty weak, I believe it's the case that once you use the entangled particles they cease to interact with one another again, something to do with Collapse of waveforms.
But you could use this to generate short messages instantaneously, say for example through one-shot disposable units. you'd courier a thousand such units to a location, and each time you wanted to send a signal back home, you'd be able to send a few words to a corresponding unit there.
Much better turnaround of information, but limited in volume.
It'd be practical to have a case-book of scenarios which you could reference by chapter and verse to make better use of the limited data.
Similar to cold-war-era codebooks, Command would send a alphanumeric signal with no discernable information encoded in it, and a submarine at sea would receive it, look up the code in a folder and follow the instructions within.