add pub domain bash and url safe base encode and decode