Write related Urls to database