• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
VdoCipher: Secure Video Hosting for BusinessVdoCipher
☰
Sign Up
  • Solutions
    • E-learning
    • Enterprise
    • Developer
    • Healthcare
    • Live Streaming
  • Features
  • Pricing
    • Video Hosting & DRM Solution
    • Live Streaming Solution
  • Live
  • Developer
  • About
    • Testimonials
    • The Company
  • Contact
Login
Sign Up

Set IP Geo restriction on videos via API/Dashboard: VdoCipher DRM

January 24, 2017 /

VdoCipher provides a complete DRM with encryption, backend licensing and viewer specific watermarking to safeguard video content. Sometimes owing to the rights and permissions to distribute a video, businesses look to white-list or blacklist content for certain geographies & IPs. Here is an API guide to do IP & Geo restriction for your VdoCipher account. This should allow you to configure any complicated setting of IP and country restrictions.

Rules are defined by a JSON string called rule-set. This JSON contains an array of rule objects:

  1. Every rule is an object containing action, ipSet and countrySet
  2. Each matching rule overrides the previous matching rule.
  3. Action can be either ‘true’ or ‘false’, whether to allow or deny
  4. ipSet and countrySet are string arrays.
  5. Subnet CIDR block can also be set in ipSet string array.
  6. Both IPv4 and IPv6 addresses and subnet are allowed
  7. countrySet has two-digit country codes (ISO 3166-1 alpha-2.).
  8. Empty set matches everything of that type.
[
  {
    "action": "false",
    "ipSet": ["122.0.0.0/16", "49.250.23.56"],
    "countrySet": []
  },
  {
    "action": "true",
    "ipSet": [],
    "countrySet": ["IN", "GB"]
  }
]

The first part of above code will block your videos from playing in the mentioned IP addresses. The second part of the code will allow the video to play only in countries – UK & India. As mentioned in point 2 , the second rules is the dominant one for common users. Thus as an example, if some user has IP – 49.250.23.56 and resides in UK, his videos will not play. So various combination of codes can be used to create custom restrictions. If there is any confusion, drop us a mail and we can provide sample codes.

For only a country-specific restriction sample code –

[ 
  {
    "action": "false",
    "ipSet": [],
    "countrySet": []
  },
  {
    "action": "true",
    "ipSet": [],
    "countrySet": ["IN","GB"]
  }
]
  

(above code only allows playback in India and Great Britain)

Or

[
  
  {
    "action": "false",
    "ipSet": [],
    "countrySet": ["IN", "GB"]
  }
]

(above code only restricts playback in India and Great Britain)

Benefit of subnet restriction is that you don’t have to write specifically multiple IP addresses. You can configure it to restrict a group of IPs under subnet.

API for setting IP-Geo restriction is the same as the video update API as provided in docs.

Here is a sample HTTP Request:

POST https://dev.vdocipher.com/api/videos/______________
Content-Type: application/json'
Accept: application/json
Authorization: Apisecret ____________

{
  "ipGeoRules": "string_containing_json_encoded_ruleset"
}

Dashboard interface for IP & GEO restriction

*This feature is also present in dashboard. Please click on the top right circular button on any video to open video settings. In it, there will be an IP/geo restriction section. Using above documentation, you can add any restriction.

Let us know at info@vdocipher.com for queries & doubts.

IP & Geo Restrict Video DRM

Supercharge Your Business with Videos

At VdoCipher we maintain the strongest content protection for videos. We also deliver the best viewer experience with brand friendly customisations. We'd love to hear from you, and help boost your video streaming business.

Free 30-day trial →
Decorative Circle

Filed Under: DRM Using VdoCipher Tagged With: GEO restrict video IP restrict Video

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Secure Your Videos

Blog Categories

  • DRM 
  • APIs and Sample Codes
  • WordPress
  • E-learning
  • Media
  • Video Tech

Popular Posts

  • Google Widevine DRM
  • WordPress video plugin
  • Video Quality
  • Dynamic Watermarking
  • Encrypted Video Streaming
  • Video Hosting For Online Courses
  • Online Video Player
  • Apple Fairplay DRM
  • SVOD VS TVOD VS AVOD
  • Exoplayer
  • DRM

Top Recent Posts

  • Enterprise Video Platform
  • Cloud Video Platform
  • Video Player for Android
  • DRM Solution
  • Video Bitrate
  • React Native Video
  • Video Piracy
  • Learning Management System
  • AVPlayer
  • Live Streaming Websites
  • DRM Providers
  • DRM Security
  • Private Video Hosting
  • HTML5 Video Player

Schedule Demo Link
Popular Blogs
  • How many use easy video download piracy tools ?
  • Apple FairPlay DRM : Video Protection on iOS & Safari
  • 12 Video Piracy Statistics, 6 Prevention Methods
  • Elearning Video Protection from Piracy
  • Content Creator Economy Growth and other Statistics Report
  • Top 21 Education Apps In India For Online Learning
  • How To Embed Videos in WordPress A Comprehensive Guide
  • Live Streaming Platform For E-learning Media & Broadcast
  • Explained in Simple Language, 32 Key DRM Encryption Terminologies
  • Best Video Player for Android Comparison 2024
Recent Blogs
  • Best Video Frame Rate or FPS for Cinematic Movies, 4K, YouTube & Instagram
  • Content Creator Economy & Growth Creator Statistics Report 2025
  • How to Build a Flutter Live Streaming Application?
  • How To Prevent Video Download From Your Website?
  • DRM Server Solutions with Widevine License and Apple FairPlay
  • Top 12 Live Streaming Platforms: All You Need To Know in 2025
  • Best DRM Tools to protect your Videos & other Digital Assets
  • Top DRM Products Overview as Software Service and Hardware
Featured Blogs
  • Online Video Player
  • Video Encryption
  • Video Protection
  • Video Hosting
  • Widevine DRM
  • Fairplay DRM
  • Video Quality
  • Online Video Platform
  • Video hosting for business
Comparison
  • VdoCipher vs Vimeo
  • VdoCipher vs Dacast
  • VdoCipher vs YouTube
  • VdoCipher vs Zoom
  • VdoCipher vs JW Player
  • VdoCipher vs Dacast Live
    Contact Us
  • Phone : +91 7619171878
  • Whatsapp : +91 7042238654
  • E-mail : support@vdocipher.com
Company
  • Home
  • Glossary
  • Features
  • About Us
  • Pricing
  • FAQs
  • Contact
Services
  • Enterprise
  • E-Learning
  • Developer
  • Healthcare
  • Live Streaming Platform
  • Video Analytics
  • Media and Entertainment
  • DRM and Antipiracy
  • APIs for Developers
  • Video Hosting
  • Video API
  • Video DRM
  • Google DRM
  • DRM License Server
  • Custom Video Player
  • Play Integrity
Countries Served
  • Secure Video Hosting in USA
  • Secure Video Hosting in India
  • Secure Video Player in Brazil
  • Secure Video Streaming in UK
  • Secure Video Streaming in Saudi Arabia
  • Video Encryption in Spain
  • Video Encryption in Italy
  • Protected Video Streaming in Indonesia
  • Encrypted Video Player in Canada
  • Protected Video Streaming in Australia
  • Encrypted Video Player in Germany
  • Video DRM for Sri Lanka
  • Video DRM for Middle East
  • DRM Encryption for Europe
  • DRM Encryption for Asia
  • DRM Solutions for Japan
  • DRM Solutions for UAE
  • DRM Software for Chile
  • DRM Software for Russia

Copyright © 2025 VdoCipher. All rights reserved.

  • Terms
  • Privacy Policy