Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

An ownCloud redirect loop almost always means the URL your browser uses does not match the URL ownCloud thinks it is serving. The disagreement can be about HTTPS versus HTTP, the public hostname or port, or a path such as /owncloud. Behind a reverse proxy, ownCloud also needs a trusted proxy declaration and reliable forwarded host and protocol headers.

Find the first value that changes in the redirect chain, correct that one URL dimension, clear the cached redirect, and test again. Do not change several unrelated settings at once.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What an ownCloud redirect loop is telling you

Each HTTP response can contain a Location header telling the browser where to go next. A healthy request eventually reaches the requested page. A loop occurs when each response sends the browser back to a URL that causes the same redirect again, or when two components keep redirecting to one another.

ownCloud builds links and redirects from the scheme, host, port, and webroot it detects. A reverse proxy may terminate TLS and connect to ownCloud over plain HTTP, so the backend can incorrectly believe the public request was HTTP. Similarly, a proxy can expose cloud.example.com while the application sees an internal hostname, or publish the application under /owncloud while the upstream mapping removes that path.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.
What changes in each Location Most likely mismatch Setting or component to inspect
https becomes http, or the reverse TLS termination or an incorrect forwarded protocol Proxy protocol header and overwriteprotocol
Public hostname changes to an internal or alternate hostname Host header, canonical-host rule, or application URL detection overwritehost and competing web-server redirects
Port changes, such as :443 to :8443 Proxy port mapping or a missing non-default port in the canonical URL overwritehost including the port
/owncloud is added or removed Subdirectory mapping and webroot detection overwritewebroot, proxy mapping, and reverse rewriting
The browser stops at an untrusted-host warning or returns to login The entered host is not allowed, or generated links point elsewhere trusted_domains and overwrite.cli.url

Map the redirect chain before changing configuration

Do not guess which layer is responsible. Capture the complete chain from the public address that users enter.

  1. Run a header-only request that follows redirects, replacing the example address with your real public URL:
    curl -I -L https://cloud.example.com/
  2. Write down every Location value in order. Also note the status code that precedes it, such as 301, 302, or 307.
  3. Repeat the check in the browser’s Network panel. A private window is useful after the configuration is changed because browsers can cache permanent redirects.
  4. Compare each hop by scheme, hostname, port, and path. The first dimension that changes is the one to fix first.

The command is a practical diagnostic, not an ownCloud requirement. The important evidence is the response chain emitted by the public endpoint, not a single final URL.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Fix an HTTP/HTTPS loop after TLS termination

This is the common reverse-proxy case: the browser connects with HTTPS, the proxy decrypts the request, and the proxy connects to the ownCloud web server over HTTP. If the proxy does not identify the original protocol correctly, ownCloud generates an HTTP URL and the proxy immediately upgrades it to HTTPS. The cycle repeats.

1. Make the proxy describe the public request

Confirm that the proxy passes the public Host and a forwarded protocol value indicating HTTPS. The value must describe what the client used, not merely the protocol used on the proxy-to-backend connection. If another load balancer sits in front of the proxy, verify which component is authoritative and prevent later layers from overwriting a correct value.

2. Set the protocol ownCloud should publish

When automatic detection is unreliable, set overwriteprotocol to https in config/config.php. Use this only when HTTPS is genuinely the scheme users enter; setting it on an HTTP-only deployment creates the opposite problem.

3. Remove competing upgrades

Check the proxy, the web server hosting ownCloud, and any application-level canonicalization for HTTP-to-HTTPS rules. Two independent rules can fight when one layer believes the canonical URL is internal HTTP. Keep one deliberate public policy and make every layer agree with it.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Fix hostname and port redirects

If the chain alternates between names or ports, ownCloud is publishing a different authority from the one in the browser. This can happen when the proxy sends an internal Host, when a web server redirects to a server-name alias, or when a non-default public port is omitted.

Use the public authority in overwritehost

Set overwritehost to the hostname users actually enter. Include a non-default port, for example cloud.example.com:8443, when that port is part of the public address. Do not include an internal container name or backend-only port.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Find and remove the second canonical redirect

Inspect redirects generated by the reverse proxy and by the upstream web server. A proxy may send users to the public name while Apache or another upstream rule sends them back to an internal name. Likewise, a rule that adds a preferred port can undo the value supplied by the proxy. Keep one canonical hostname and port, then make the proxy’s forwarded host and ownCloud’s overwrite value match it exactly.

Fix a loop that adds or removes /owncloud

A root deployment and a subdirectory deployment are different URL designs. In a root deployment, users enter https://cloud.example.com/. In a subdirectory deployment, they enter a path such as https://cloud.example.com/owncloud. The public path, the proxy’s upstream mapping, and ownCloud’s webroot must describe the same design.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set the externally visible webroot

Use overwritewebroot for the path visible to users when automatic detection fails. Set it to /owncloud for a subdirectory deployment; use the root value appropriate to a root deployment rather than leaving a stale subdirectory from an earlier arrangement.

Check both directions of the proxy mapping

The forward mapping must send the public subdirectory to the correct ownCloud upstream, and reverse rewriting must change backend redirects back to that public path. In Apache, that means checking both ProxyPass and ProxyPassReverse. A mapping that forwards requests correctly but leaves response headers pointing at an internal path can produce an apparent loop.

Do not mix root and subdirectory URLs

Choose one public base URL for bookmarks, health checks, cron links, and administrative instructions. Testing the root URL while configuring ownCloud for /owncloud, or vice versa, makes a correct configuration look broken.

Trust the proxy and the public host explicitly

ownCloud’s documentation requires an explicit list of proxy servers it is allowed to trust. Without that list, forwarded headers may be ignored; with an overly broad list, a client could spoof information such as its apparent IP address.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

trusted_proxies

Add only the address or addresses of proxies that should be trusted. These are normally the network addresses from which the proxy connects to ownCloud, not every private network and not arbitrary client subnets. If only one proxy should receive conditional overwrite behavior, overwritecondaddr can restrict those rules with a regular expression matching that proxy’s address.

trusted_domains

Every hostname or IP address used to access the server must be listed in trusted_domains. Include the exact public name users enter, and add another name only when it is an intentional access route. A missing entry can produce an untrusted-domain response that users sometimes mistake for a redirect problem.

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

When a loop appears only after login

A login-page loop still points to a URL disagreement when the post-login response changes scheme, host, port, or path. Use the Network panel to inspect the request that submits the login form and the first response afterward. If that response points at another hostname, correct overwritehost or the proxy’s forwarded host. If it changes from HTTPS to HTTP, correct the forwarded protocol and overwriteprotocol. If it drops or adds /owncloud, correct the webroot and reverse mapping.

Also test a link generated outside the initial page. Cron notifications, WebDAV clients, and commands run through occ use the base URL in overwrite.cli.url; a wrong value can send a user to another domain and prompt for a second login even when the landing page works.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Proxy checks for Nginx, Apache, and layered gateways

On Nginx, Apache, or a managed gateway, verify the same four facts: the upstream receives the intended public host, the forwarded protocol says what the browser used, the public path maps to the expected ownCloud directory, and response redirects are rewritten back to the public URL. The product names differ, but a mismatch in any one of these facts produces the same symptom.

For Apache, inspect both ProxyPass and ProxyPassReverse; checking only the forward rule is insufficient because backend-generated Location headers can still expose an internal address. With multiple proxy layers, decide which layer sets the canonical host and protocol, then ensure later layers preserve those values. Do not let an internal health-check listener or alternate virtual host apply a different canonicalization rule.

If the service is reachable through more than one proxy address, static overwrite values may be too broad. In that case, use overwritecondaddr so conditional overwrites apply only when the request originates from the expected proxy address. The expression must match the address ownCloud actually sees, and the trusted-proxy list must still contain only deliberate proxy endpoints.

A reference configuration pattern

Adapt every value to the real deployment; do not paste this example unchanged.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
// config/config.php
$CONFIG = [
  'trusted_proxies' => ['10.0.0.10'],
  'trusted_domains' => ['cloud.example.com'],
  'overwritehost' => 'cloud.example.com',
  'overwriteprotocol' => 'https',
  'overwritewebroot' => '/owncloud',
  'overwrite.cli.url' => 'https://cloud.example.com/owncloud',
];

The proxy address in trusted_proxies must be the address ownCloud actually sees. The public name in trusted_domains and overwritehost must match the browser-facing name. The webroot must match the path in the address users enter.

Why overwrite.cli.url matters

overwrite.cli.url is the full base URL used by cron jobs and links generated by occ. If it points to another hostname, scheme, port, or path, automated messages and command output can send users to a different domain and require another login even after the web interface appears fixed.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

Docker-specific settings

In a Docker deployment, the effective configuration may be generated from environment variables rather than edited directly on the host. The migration documentation defines OWNCLOUD_TRUSTED_DOMAINS as a comma-separated list for multiple names. When that variable is undefined, OWNCLOUD_DOMAIN supplies the domain value.

  1. Inspect the environment and configuration inside the running container so you know which value is active.
  2. Set OWNCLOUD_TRUSTED_DOMAINS to every intentional hostname, separated by commas, or set OWNCLOUD_DOMAIN when the trusted-domains variable is not being used.
  3. Verify the proxy address and overwrite values in the effective ownCloud configuration, not only in a compose file.
  4. Restart the service after changing environment variables; a running container does not automatically adopt modified environment settings.
  5. Repeat the header test from the public endpoint.

Do not add an internal container name to the public trusted-domain list unless users really access ownCloud with that name.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose settings that match the deployment design

Decision Option A Option B What must match
TLS location Terminate TLS at the reverse proxy, then connect to ownCloud over HTTP Terminate TLS at the ownCloud web server The browser-facing scheme and the forwarded protocol that ownCloud receives
Public path Root deployment at / Subdirectory deployment at /owncloud Proxy mapping, overwritewebroot, and generated base URLs
Overwrite scope Static overwrite values for one known public endpoint Conditional values using overwritecondaddr Whether requests can arrive through different trusted proxies or addresses

Neither option is inherently correct for every installation. The correct choice is the one that represents the URL users actually enter and the headers the proxy actually sends.

Safe change sequence

  1. Back up config/config.php and record the current redirect chain.
  2. Identify whether the first change is scheme, host or port, or path.
  3. Correct the corresponding proxy header or ownCloud overwrite setting. Change one URL dimension at a time.
  4. Add the exact public hostname or IP to trusted_domains.
  5. Confirm that only the intended proxy addresses are in trusted_proxies.
  6. Open the public URL in a private browser window and run the header-only request again.
  7. Compare the new chain with the recorded chain. If it still changes, inspect ownCloud and web-server logs before altering another setting.

For a 301 response, clear the browser’s cached redirect or test with a new private session; otherwise an old redirect can conceal a successful server-side fix.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common fixes that make the problem worse

  • Adding every private subnet to trusted_proxies: this weakens header trust and can permit spoofed client information. List only actual proxy addresses.
  • Changing all overwrite values at once: you lose the ability to tell which dimension was wrong. Correct scheme, authority, and path in sequence.
  • Setting overwriteprotocol without fixing the proxy header: this may mask one request path while leaving other hosts or proxies inconsistent.
  • Adding an alias to trusted_domains instead of choosing a canonical host: trust permits access but does not stop competing hostname redirects.
  • Editing a host configuration while Docker regenerates it: the running container may continue using environment-derived values until it is restarted.
  • Testing only the login page: cron links, redirects after login, WebDAV clients, and occ-generated URLs can expose a wrong overwrite.cli.url even when the first page loads.
  • Assuming a browser cache proves the server is still broken: a cached 301 can survive a correct fix. Compare with curl and a private session before making another server change.
  • Testing from only one network: split DNS, IPv4, IPv6, or a second load-balancer listener may send some users to a different proxy configuration.

When the loop persists

Capture a fresh chain from outside the private network so split-DNS behavior does not hide the public route. Check which component emitted each Location, then correlate its timestamp with proxy, web-server, and ownCloud logs. A response that alternates between two locations usually identifies two separate canonicalization rules; a response that repeats one location usually indicates that ownCloud’s inferred base URL still disagrees with the request.

Also verify that health checks, load balancer listeners, and alternate IPv4 or IPv6 routes use the same canonical host and protocol. If only one address reaches a different proxy configuration, users may see a loop intermittently rather than on every request.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If maintaining these headers and TLS rules is outside your team’s role, a managed ownCloud host or a reverse-proxy service that explicitly supports TLS termination can reduce operational work. Treat that as a deployment choice, not a substitute for identifying the canonical URL: the provider still needs the public host, protocol, path, and trusted-proxy arrangement to match. Check the provider’s current feature and support terms before purchasing, and do not expect a physical product to correct an application URL mismatch.

Frequently Asked Questions

Why does ownCloud work on localhost but loop on my public domain?

Local access usually bypasses TLS termination and the reverse proxy, so ownCloud sees the same scheme, host, and path that you use. The public route may hide HTTPS, change the host, or add a subdirectory. Trace the public Location headers and configure the matching forwarded headers and overwrite values.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Which ownCloud setting stops an HTTPS-to-HTTP loop?

Set overwriteprotocol to https when HTTPS is the public scheme, and make sure the trusted proxy sends the correct forwarded protocol. Do not set it on an HTTP-only deployment.

What belongs in trusted_proxies?

Only the IP address or addresses of proxies that connect to ownCloud and whose forwarded headers you intend to trust. Do not add every private subnet or arbitrary client network.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What belongs in trusted_domains?

Every exact hostname or IP that users intentionally enter in the browser. For Docker, use OWNCLOUD_TRUSTED_DOMAINS as a comma-separated list, or OWNCLOUD_DOMAIN when the trusted-domains variable is undefined, then restart the service.

How do I fix a loop that adds or removes /owncloud?

Choose either a root or subdirectory public design. Set overwritewebroot to the externally visible path and verify both sides of the proxy mapping, including Apache’s ProxyPassReverse when applicable.

Should I include the port in overwritehost?

Yes, when users access a non-default public port. Use the public authority, such as cloud.example.com:8443, not an internal backend port.

Why does the first page load but cron or occ links go to another login?

Those links use overwrite.cli.url. Set it to the complete public base URL, including scheme, hostname, port, and webroot, then test a generated link.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do I need to change every setting after seeing a redirect loop?

No. Record the chain, identify the first changing dimension, correct that proxy header or overwrite setting, clear cached redirects, and retest before changing anything else.

The Bottom Line

Trace every Location header and fix the first mismatch in scheme, host or port, or webroot. Trust only the real proxy addresses, list every intentional public host, keep Docker variables and running containers synchronized, and verify the result with a fresh header request and private browser session.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.