diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -77,8 +77,15 @@ SSDP.prototype._init = function (opts) {
 
   this._ttl = opts.ttl || 1800
 
-  // Probably should specify these
-  this._location = opts.location || 'http://' + ip.address() + ':' + 10293 + '/upnp/desc.html'
+  if (typeof opts.location === 'function') {
+    Object.defineProperty(this, '_location', {
+      enumerable: true,
+      get: opts.location
+    });
+  } else {
+    // Probably should specify these
+    this._location = opts.location || 'http://' + ip.address() + ':' + 10293 + '/upnp/desc.html'
+  }
 
   this._unicastHost = opts.unicastHost || '0.0.0.0'
   this._ssdpServerHost = this._ssdpIp + ':' + this._ssdpPort
"location" option can now be a function which returns the location string